]> git.ipfire.org Git - thirdparty/libvirt.git/commit
This rather large patch rewrites the virStorageBackendISCSIFindLUNs() function
authorChris Lalancette <clalance@redhat.com>
Tue, 17 Jun 2008 12:49:37 +0000 (12:49 +0000)
committerChris Lalancette <clalance@redhat.com>
Tue, 17 Jun 2008 12:49:37 +0000 (12:49 +0000)
commit0de4f35ebc39ddfa1c3cfea9cefb1966c45fbbbd
treee0f9d28d5bc666094de769e759abd230ae84c26d
parent94e3ba0e87d71fde9195939b3aabe527b0f28a09
This rather large patch rewrites the virStorageBackendISCSIFindLUNs() function
to only rely on sysfs for finding LUNs, given a session number.  Along the way,
it also fixes the bug where we wouldn't find LUNs for older kernels (with the
block:sda format), and also fixes a race condition where we could try
to find the LUN before udev has finished connecting it.

This patch fixes a few different bugs:
1) We weren't finding LUNs on pre 2.6.24 kernels
2) libvirtd sysfs scanning was racing with udev, so we didn't always see LUNs
3) We weren't showing the 0'th LUN, although that can be a valid LUN

Signed-off-by: Chris Lalancette <clalance@redhat.com>
src/storage_backend_iscsi.c