Whamcloud - gitweb
LU-9292 utils: handle partitioned MD arrays correctly 99/26399/2
authorJadhav Vikram <jadhav.vikram@seagate.com>
Tue, 4 Apr 2017 04:08:11 +0000 (09:38 +0530)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 26 Apr 2017 03:39:47 +0000 (03:39 +0000)
mount.lustre doesn't handle partitioned MD arrays correctly.
The function set_blockdev_tunables doesn't correctly parse
the newer names of partitioned MD devices (e.g /dev/md0p2).
It is written to parse the older partitioned MD devices
(e.g /dev/md_d2p3). This means that MD partions like /dev/md0p2
do not receive MD-level tunings that non-partitioned MD devices
get (specifically stripe_cache_size), leading to a large
performance hit. so fix is to handle newer and older MD device

Seagate-bug-id: MRP-2608
Signed-off-by: Jadhav Vikram <jadhav.vikram@seagate.com>
Reviewed-by: Ashish Purkar <ashish.purkar@seagate.com>
Reviewed-by: Christopher Walker <chris.walker@seagate.com>
Tested-by: Elena V. Gryaznova <elena.gryaznova@seagate.com>
Reviewed-by: Andriy Skulysh <andriy.skulysh@seagate.com>
Change-Id: Ia0abe63e725e3a70d2561960faa1bc48981f2fd0
Reviewed-on: https://review.whamcloud.com/26399
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>

index 2620238..f8999db 100644 (file)
@@ -1146,7 +1146,7 @@ static int set_blockdev_tunables(char *source, struct mount_opts *mop)
                while (--dev > real_path && isdigit(*dev))
                        *dev = 0;
-               if (strncmp(real_path, "/dev/md_", 8) == 0)
+               if (strncmp(real_path, "/dev/md", 7) == 0 && dev[0] == 'p')
                        *dev = 0;