v3 here:
http://www.redhat.com/archives/libvir-list/2015-April/msg00240.html
changes:
Patch 1: (prior patch 1)
Adjustments from code review - mostly just creating a new function
using the "const char *" path instead of pool pointer. Called only
from virStorageBackendStablePath
Patch 2: (prior patch 3)
Rather than continue to try to talk through the v3, here's the latest
changes. These will just check in the SCSINewLun if the source pool
target path doesn't start with /dev, then to just fail. This includes
if the path is "/dev" or "/dev/". Theory for failure is that even
if
we allowed "/dev" or "/dev/" to continue down into the call to
virStorageBackendStablePath all we'd get back was the duplicated
'devpath' which we'd claim was non-fatal.
Patch 3: (NEW)
Adjust virStorageBackendSCSIFindLUs to return a count of LU's found
rather than the current "0" or -1" with a setting of the boolean found
(which gets ignored in most cases). By returning a count, 0, or -1 the
caller can decide what to do with the data.
Patch 4: (prior patch 4)
Couple of minor changes regarding comments and the use of a goto instead
of if then else in processLU retval checks. Kept the flow as previous
including using 'retval' in virStorageBackendSCSIFindLUs rather than
creating yet another local status that would need to be checked.
John Ferlan (4):
storage: Split out the valid path check
scsi: Adjust return value for virStorageBackendSCSINewLun
scsi: Change return values for virStorageBackendSCSIFindLUs
scsi: Adjust return values from processLU
src/storage/storage_backend.c | 26 +++++-----
src/storage/storage_backend.h | 1 +
src/storage/storage_backend_scsi.c | 101 ++++++++++++++++++++++++-------------
3 files changed, 79 insertions(+), 49 deletions(-)
--
2.1.0