]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen/scsiback: avoid warnings when adding multiple LUNs to a domain
authorJuergen Gross <jgross@suse.com>
Mon, 8 Feb 2016 14:30:19 +0000 (15:30 +0100)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 10 May 2016 20:41:51 +0000 (22:41 +0200)
commit5ed256a38c3ffb449de6b92bf705fb8878dacbba
treea0019dbd85c3dc4bd0bd7da4d12d59b74e1b7e66
parent49c97a3e1e4fa61d7ccd042a9a4eaf68fd0d270c
xen/scsiback: avoid warnings when adding multiple LUNs to a domain

When adding more than one LUN to a frontend a warning for a failed
assignment is issued in dom0 for each already existing LUN. Avoid this
warning by checking for a LUN already existing when existence is
allowed (scsiback_do_add_lun() called with try == 1).

As the LUN existence check is needed now for a third time, factor it
out into a function. This in turn leads to a more or less complete
rewrite of scsiback_del_translation_entry() which will now return a
proper error code in case of failure.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
(cherry picked from commit c9e2f531be000af652927ee0af3a0f24f8e9e046)
Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Conflicts:
drivers/xen/xen-scsiback.c
drivers/xen/xen-scsiback.c