From cfa753be957c8d786f7c3383b0ae8716f8c10030 Mon Sep 17 00:00:00 2001 From: Alex Zhuravlev Date: Tue, 17 Oct 2023 14:12:01 +0300 Subject: [PATCH] LU-17202 target: set SB_KERNMOUNT set SB_KERNMOUNT on server's mountpoint so umount process block until the server (MDS/OST/MGS) is really umounted and released the corresponding block device. Lustre-change: https://review.whamcloud.com/52724 Lustre-commit: TBD (from 005a85f1c17a6c3477786a47dccfb67f2b36cb09) Signed-off-by: Alex Zhuravlev Change-Id: I03ac2dc6bb7cd4d93f5a1729fccb976aa1ebd5d4 Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/52725 Reviewed-by: Andreas Dilger Tested-by: jenkins Tested-by: Maloo --- lustre/obdclass/obd_mount_server.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lustre/obdclass/obd_mount_server.c b/lustre/obdclass/obd_mount_server.c index 47003be..54d4e92 100644 --- a/lustre/obdclass/obd_mount_server.c +++ b/lustre/obdclass/obd_mount_server.c @@ -1911,7 +1911,8 @@ static int server_fill_super_common(struct super_block *sb) sb->s_blocksize_bits = log2(sb->s_blocksize); sb->s_magic = LUSTRE_SUPER_MAGIC; sb->s_maxbytes = 0; /* we don't allow file IO on server mountpoints */ - sb->s_flags |= SB_RDONLY; + /* set SB_KERNMOUNT to make umount synchronous */ + sb->s_flags |= SB_RDONLY | SB_KERNMOUNT; sb->s_op = &server_ops; root = new_inode(sb); -- 1.8.3.1