From 701cc249594eae08f6e762eff74183e768c2cee3 Mon Sep 17 00:00:00 2001 From: Artem Blagodarenko Date: Thu, 7 May 2020 20:36:05 +0300 Subject: [PATCH] LU-13533 utils: ext4lazyinit should be disabled lazyinit gets more than 24H on typical OST installation and produces writes inside read. This influences to benchmark tests that are usually executed just after cluster installation is complete. Testing shows, disabling that feature adds ~30 sec to formating OST drive so that is not a noticeable time during install. Explicitly send lazy_itable_init and lazy_journal_init in conf_sanity 116 to avoid out of disk space. HPE-bug-id: LUS-3358 Signed-off-by: Artem Blagodarenko Signed-off-by: Alexey Lyashkov Change-Id: I95bfa43d11cd67c890b036aa0b71fae4c1eea37d Reviewed-on: https://review.whamcloud.com/38534 Reviewed-by: Andreas Dilger Reviewed-by: Alex Zhuravlev Tested-by: jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/tests/conf-sanity.sh | 5 ++++- lustre/utils/libmount_utils_ldiskfs.c | 12 ++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh index 7795faf..438a08f 100644 --- a/lustre/tests/conf-sanity.sh +++ b/lustre/tests/conf-sanity.sh @@ -8559,7 +8559,10 @@ test_116() { MDSSIZE=$old_mdssize MDSISIZE=$old_mdsisize - do_facet $SINGLEMDS $MKFS $opts17t $tmpmnt/$mdtimg || + + do_facet $SINGLEMDS $MKFS \ + ${opts17t/-E /-E lazy_itable_init,lazy_journal_init,} \ + $tmpmnt/$mdtimg || error "failed to mkfs for $tmpmnt/$mdtimg" do_facet $SINGLEMDS $TUNE2FS -l $tmpmnt/$mdtimg | diff --git a/lustre/utils/libmount_utils_ldiskfs.c b/lustre/utils/libmount_utils_ldiskfs.c index 7532d11..df6d0b1 100644 --- a/lustre/utils/libmount_utils_ldiskfs.c +++ b/lustre/utils/libmount_utils_ldiskfs.c @@ -882,9 +882,17 @@ int ldiskfs_make_lustre(struct mkfs_opts *mop) } /* Avoid zeroing out the full journal - speeds up mkfs */ - if (is_e2fsprogs_feature_supp("-E lazy_journal_init")) + if (is_e2fsprogs_feature_supp("-E lazy_journal_init=0")) { append_unique(start, ext_opts ? "," : " -E ", - "lazy_journal_init", NULL, maxbuflen); + "lazy_journal_init=0", NULL, maxbuflen); + ext_opts = 1; + } + if (is_e2fsprogs_feature_supp("-E lazy_itable_init=0")) { + append_unique(start, ext_opts ? "," : "-E", + "lazy_itable_init=0", NULL, maxbuflen); + ext_opts = 1; + } + /* end handle -E mkfs options */ /* Allow reformat of full devices (as opposed to partitions). -- 1.8.3.1