]> git.baikalelectronics.ru Git - kernel.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)
committerDavid Vrabel <david.vrabel@citrix.com>
Mon, 8 Feb 2016 16:51:36 +0000 (16:51 +0000)
commitb77e3dc23b45a77fda41ab992cfa1fbd509e7353
tree8bcf8cefe2dd2c80cfbf9d6a9c627aef2c63cc8c
parent010ef6de18d3325282136a63793a3165f2387e6e
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>
drivers/xen/xen-scsiback.c