[multipath] disabling lock_fs call on DM_DEVICE_RESUME libdevmapper ioctl
authorChristophe Varoqui <cvaroqui@zezette.localdomain>
Sun, 3 Sep 2006 22:33:08 +0000 (00:33 +0200)
committerChristophe Varoqui <cvaroqui@zezette.localdomain>
Sun, 3 Sep 2006 22:33:08 +0000 (00:33 +0200)
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.

Edward Goggin, EMC

libmultipath/devmapper.c

index c0765ae..69eecde 100644 (file)
@@ -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);