Whamcloud - gitweb
LU-14490 lmv: striped directory as subdirectory mount 93/41893/4
authorLai Siyao <lai.siyao@whamcloud.com>
Fri, 5 Mar 2021 09:07:34 +0000 (17:07 +0800)
committerOleg Drokin <green@whamcloud.com>
Sat, 13 Mar 2021 18:33:12 +0000 (18:33 +0000)
commit775f88ed6c8b6235031268e258e15da405a5b955
treed6485011d27abd6c3eef44e9ea80ed691f5fb156
parent571f3cf1115973d0fdaf6d5244bfeee230b52989
LU-14490 lmv: striped directory as subdirectory mount

lmv_intent_lookup() will replace fid1 with stripe FID, but if striped
directory is mounted as subdirectory mount, it should be handled
differently. Because fid2 is directory master object, if stripe is
located on different MDT as master object, it will be treated as
remote object by server, thus server won't reply LOOKUP lock back,
therefore each file access needs to lookup "/".

And remote directory (either plain or striped) shouldn't be used for
subdirectory mount, because remote object can't get LOOKUP lock.
Add an option "mdt_enable_remote_subdir_mount" (1 by default for
backward compatibility), mdt_get_root() will return -EREMOTE if
user specified subdir is a remote directory and this option is
disabled.

Add sanity 247g, updated 247f.

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I5e8f95ee95c4155336098e55b7569ed7a43865c1
Reviewed-on: https://review.whamcloud.com/41893
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Yingjin Qian <qian@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/lmv/lmv_intent.c
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_internal.h
lustre/mdt/mdt_lproc.c
lustre/tests/sanity.sh