[libvirt] [PATCH v3 0/4] storage: handle scsi/iscsi error paths better

John Ferlan jferlan at redhat.com
Tue Apr 7 20:20:59 UTC 2015

Rework of unpushed patches from series:



Patch 1 - Split out the non /dev/* checks into their own to start
          satisfying Jan's comment in his review of the former patch 3:


Patch 2 - New - Flip the logic from assume success, change status to failure,
          and return to assume failure and only have success when everything
          completes successfully

Patch 3 - Adjustments for previous patch 3 to make use of patch 1's split
          of the checking for using the /dev path.  If we find that the
          /dev/* is not in use for the pool, then force an error earlier.
          This makes the check later on not need to compare the returned
          path to the generated 'devpath' to compensate for the logic in
          virStorageBackendStablePath which will strdup the incoming target
          path if something goes wrong in looking up the directory. Since
          both paths will use the new virStorageBackendPoolUseDevPath
          slightly differently, if devpath is the same as vol->target.path,
          then we know it's not because the pool target path was to blame.

Patch 4 - Is the former patch 5, but now since patch 3 returns a failure
          in virStorageBackendSCSINewLun for that bad path, we can use it
          to be the error arbiter and bug fixer.

Former patch 6 - no longer necessary, although it would circumvent any of
the above patches being necessary to solve the bug...

John Ferlan (4):
  storage: Split out the valid path check
  refactor virStorageBackendSCSINewLun
  scsi: Adjust return value for virStorageBackendSCSINewLun
  scsi: Adjust return values from processLU

 src/storage/storage_backend.c      |  42 +++++++++----
 src/storage/storage_backend.h      |   1 +
 src/storage/storage_backend_scsi.c | 124 +++++++++++++++++++++----------------
 3 files changed, 100 insertions(+), 67 deletions(-)


More information about the libvir-list mailing list