From ccf889d2a3de4c3abe9bf0f4ebd75ca82932ab8e Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Fri, 28 Aug 2015 13:48:28 -0600 Subject: [PATCH] LU-6974 util: set max_sectors_kb properly Reduce max_sectors_kb to avoid crash on some special block devices. Test-Parameters: alwaysuploadlogs envdefinitions=SLOW=yes,ENABLE_QUOTA=yes mdtfilesystemtype=ldiskfs mdsfilesystemtype=ldiskfs ostfilesystemtype=ldiskfs clientdistro=el7 ossdistro=el7 mdsdistro=el7 mdtcount=1 testlist=runtests Signed-off-by: Andreas Dilger Change-Id: Ifc7efd169f0db0b54c3f727fc65716c203930e29 Reviewed-on: http://review.whamcloud.com/16116 Reviewed-by: Bob Glossman Tested-by: Jenkins Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: Oleg Drokin --- lustre/utils/mount_utils_ldiskfs.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lustre/utils/mount_utils_ldiskfs.c b/lustre/utils/mount_utils_ldiskfs.c index 584d6fd..6bc37a21 100644 --- a/lustre/utils/mount_utils_ldiskfs.c +++ b/lustre/utils/mount_utils_ldiskfs.c @@ -1210,10 +1210,12 @@ set_params: if (newval == 0 || newval == ULLONG_MAX || end == buf) goto subdevs; - /* Don't increase IO request size limit past 32MB. It is about - * 2x PTLRPC_MAX_BRW_SIZE, but that isn't in a public header. */ - if (newval > 32 * 1024) { - newval = 32 * 1024; + /* Don't increase IO request size limit past 16MB. It is about + * PTLRPC_MAX_BRW_SIZE, but that isn't in a public header. + * Note that even though the block layer allows larger values, + * setting max_sectors_kb = 32768 causes crashes (LU-6974). */ + if (newval > 16 * 1024) { + newval = 16 * 1024; snprintf(buf, sizeof(buf), "%llu", newval); } -- 1.8.3.1