From a7ae8da2422954fd1a8f91e857a92f337589f3f6 Mon Sep 17 00:00:00 2001 From: Alex Zhuravlev Date: Thu, 26 Sep 2019 15:39:36 +0300 Subject: [PATCH] LU-12809 llite: statfs to use NODELAY with MDS otherwise client umount can get stuck if MDS is down for a reason. recovery-small/110k simulates this. Signed-off-by: Alex Zhuravlev Change-Id: I40f6059d429b51a877deb532c1d0302dba0d5c85 Reviewed-on: https://review.whamcloud.com/36297 Reviewed-by: Andreas Dilger Tested-by: jenkins Tested-by: Maloo Reviewed-by: Mike Pershin --- lustre/llite/llite_lib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index 22fa391..83e9490 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -1946,6 +1946,9 @@ int ll_statfs_internal(struct ll_sb_info *sbi, struct obd_statfs *osfs, ENTRY; max_age = ktime_get_seconds() - sbi->ll_statfs_max_age; + if (sbi->ll_flags & LL_SBI_LAZYSTATFS) + flags |= OBD_STATFS_NODELAY; + rc = obd_statfs(NULL, sbi->ll_md_exp, osfs, max_age, flags); if (rc) RETURN(rc); @@ -1958,9 +1961,6 @@ int ll_statfs_internal(struct ll_sb_info *sbi, struct obd_statfs *osfs, if (osfs->os_state & OS_STATE_SUM) GOTO(out, rc); - if (sbi->ll_flags & LL_SBI_LAZYSTATFS) - flags |= OBD_STATFS_NODELAY; - rc = obd_statfs(NULL, sbi->ll_dt_exp, &obd_osfs, max_age, flags); if (rc) /* Possibly a filesystem with no OSTs. Report MDT totals. */ GOTO(out, rc = 0); -- 1.8.3.1