Whamcloud - gitweb
LU-11736 utils: don't set max_sectors_kb on MDT/MGT 11/34311/2
authorAndreas Dilger <adilger@whamcloud.com>
Thu, 6 Dec 2018 00:15:05 +0000 (17:15 -0700)
committerOleg Drokin <green@whamcloud.com>
Tue, 19 Mar 2019 06:01:15 +0000 (06:01 +0000)
The max_sectors_kb tunable should not be applied to MDT and MGT
devices. This tuning is needed for efficiency of large IOs for
spinning disks, but is not needed for SSDs or regular IO. It can
cause problems with DM Multipath configurations for minimal
benefits, so should be limited to OST devices.

This only applies to ldiskfs backend filesystems, no such tuning
is currently done for any ZFS devices.

Lustre-change: https://review.whamcloud.com/33796
Lustre-commit: 2f8d7b4679de3fa467040aa61733f262714e39c9

Test-Parameters: trivial testlist=conf-sanity
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I496603da13aae042f63cc37c0dea221a393ebbe5
Reviewed-by: Nathaniel Clark <nclark@whamcloud.com>
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: Gu Zheng <gzheng@ddn.com>
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/34311
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
lustre/utils/libmount_utils_ldiskfs.c

index 5fece46..c1f79ae 100644 (file)
@@ -1238,6 +1238,13 @@ static int tune_block_dev(const char *src, struct mount_opts *mop)
        char *real_sys_path = NULL;
        int rc;
 
+       /*
+        * Don't apply block device tuning for MDT or MGT devices,
+        * since we don't need huge IO sizes to get good performance
+        */
+       if (!IS_OST(&mop->mo_ldd))
+               return 0;
+
        if (src == NULL)
                return EINVAL;
 
@@ -1267,8 +1274,7 @@ static int tune_block_dev(const char *src, struct mount_opts *mop)
                        goto have_whole_dev;
 
                if (verbose)
-                       fprintf(stderr,
-                               "warning: cannot access '%s': %s\n",
+                       fprintf(stderr, "warning: cannot access '%s': %s\n",
                                partition_path, strerror(errno));
                rc = errno;
                goto out;