disabling lock_fs call on DM_DEVICE_RESUME libdevmapper ioctl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Christophe,

This patch to dm_simplecmd of multipath-tools/libmultipath/devmapper.c will
disable the use of lock_fs during I/O suspension while changing dm-multipath
device mapper maps via the DM_DEVICE_RESUME ioctl of libdevmapper.

Disabling lock_fs will result in not flushing I/O to the dm-multipath block
device before changing the maps for the mapped device.  Flushing I/O at this
time appears not only unnecessary for dm-multipath devices but causes some
troublesome delays due to SCSI HBA driver target-side timeouts when these
maps are changed as a result of paths coming and going while upgrading
software (a non-disruptive ucode upgrade) on a storage system.

As is the case for any change which is dependent on similar changes in
libdevmapper and the kernel, this patch will introduce a dependency on
libdevmapper and kernel.  Not sure which versions first had this support but
at least libdevmapper 1.02.02 and linux kernel version 2.6.18-rc2 have the
required support.

diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c
index c0765ae..67c7740 100644
--- a/libmultipath/devmapper.c
+++ b/libmultipath/devmapper.c
@@ -105,6 +105,7 @@ dm_simplecmd (int task, const char *name
 		goto out;
 
 	dm_task_no_open_count(dmt);
+	dm_task_skip_lockfs(dmt);	/* for DM_DEVICE_RESUME */
 
 	r = dm_task_run (dmt);
 
@@ -183,6 +184,41 @@ out:
 }

Thanks,

Ed 

--

dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux