]> git.kernelconcepts.de Git - karo-tx-linux.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)
commitc9e2f531be000af652927ee0af3a0f24f8e9e046
tree8bcf8cefe2dd2c80cfbf9d6a9c627aef2c63cc8c
parentf285aa8db7cc4432c1a03f8b55ff34fe96317c11
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