Whamcloud - gitweb
LU-14490 lmv: striped directory as subdirectory mount 46/42046/2
authorLai Siyao <lai.siyao@whamcloud.com>
Fri, 5 Mar 2021 09:07:34 +0000 (17:07 +0800)
committerOleg Drokin <green@whamcloud.com>
Mon, 22 Mar 2021 16:27:19 +0000 (16:27 +0000)
commit1d3941011bb8a7436f724bc83cf33e6a45eff15e
tree1138ed6b84ee119e1a1226c1e093532c13191213
parentd43375868aba4edcf0bc637256a9fb102709f14f
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.

Lustre-change: https://review.whamcloud.com/41893
Lustre-commit: 503917278a8f1dd7dd578fea6551de6c5dc4ebb9

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I5e8f95ee95c4155336098e55b7569ed7a43865c1
Reviewed-on: https://review.whamcloud.com/42046
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@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