From: Jadhav Vikram Date: Tue, 4 Apr 2017 04:08:11 +0000 (+0530) Subject: LU-9292 utils: handle partitioned MD arrays correctly X-Git-Tag: 2.9.57~52 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=1582846e218a7c4953bc0af2165f0af103657a77 LU-9292 utils: handle partitioned MD arrays correctly 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 names. Seagate-bug-id: MRP-2608 Signed-off-by: Jadhav Vikram Reviewed-by: Ashish Purkar Reviewed-by: Christopher Walker Tested-by: Elena V. Gryaznova Reviewed-by: Andriy Skulysh Change-Id: Ia0abe63e725e3a70d2561960faa1bc48981f2fd0 Reviewed-on: https://review.whamcloud.com/26399 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Nathaniel Clark Reviewed-by: Bob Glossman Reviewed-by: Oleg Drokin --- diff --git a/lustre/utils/mount_utils_ldiskfs.c b/lustre/utils/mount_utils_ldiskfs.c index 2620238..f8999db 100644 --- a/lustre/utils/mount_utils_ldiskfs.c +++ b/lustre/utils/mount_utils_ldiskfs.c @@ -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; }