Whamcloud - gitweb
LU-12682 llite: fake symlink type of foreign file/dir 56/35856/52
authorBruno Faccini <bruno.faccini@intel.com>
Thu, 22 Aug 2019 08:22:53 +0000 (10:22 +0200)
committerOleg Drokin <green@whamcloud.com>
Fri, 26 Feb 2021 07:21:28 +0000 (07:21 +0000)
commit15d44e787e17ff57fc1fb5a6c9ae568cdaab6e34
tree2594242a377312a0052975e8533ca884f518f2ff
parentdfe87b089b662663ba125769866c98e803f89a8c
LU-12682 llite: fake symlink type of foreign file/dir

This patch implements a "fake symlink" specific usage of
"foreign" LOV/LMV format. It basically allows these
particular type of foreign files/dirs to behave as a
symlink from VFS point of view, by allowing to construct
a relative path from the LOV/LMV foreign content, to
complement it with a prefix, and then to expose it to
the VFS as a symlink destination. The default/internal
mechanism simply takes the full foreign free string as
the relative path, and for more complex internal formats
an upcall has been implemented to provide format's
details (presently just in terms of constant strings
and substrings positions in EA, but this can be enhanced)
to llite layer.
Using this feature, instead of real symlinks or user EA,
will permit to benefit from the special features (lock,
prefetch, caches) already implemented to handle both
LOV/LMV EAs.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: Id3c262e3b042447aa09aad25f682ff02787b350d
Reviewed-on: https://review.whamcloud.com/35856
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Ben Evans <beevans@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
36 files changed:
lustre/doc/Makefile.am
lustre/doc/lfs-find.1
lustre/doc/lfs-setdirstripe.1
lustre/doc/lfs-setstripe.1
lustre/doc/lfs.1
lustre/doc/llapi_file_create_foreign.3
lustre/doc/llapi_unlink_foreign.3 [new file with mode: 0644]
lustre/include/lustre/lustreapi.h
lustre/include/uapi/linux/lustre/lustre_user.h
lustre/llite/Makefile.in
lustre/llite/dcache.c
lustre/llite/dir.c
lustre/llite/file.c
lustre/llite/foreign_symlink.h [new file with mode: 0644]
lustre/llite/llite_foreign.c [new file with mode: 0644]
lustre/llite/llite_foreign_symlink.c [new file with mode: 0644]
lustre/llite/llite_internal.h
lustre/llite/llite_lib.c
lustre/llite/lproc_llite.c
lustre/llite/namei.c
lustre/llite/pcc.c
lustre/llite/symlink.c
lustre/lov/lov_object.c
lustre/lov/lov_pack.c
lustre/tests/Makefile.am
lustre/tests/checkstat.c
lustre/tests/create_foreign_dir.c
lustre/tests/create_foreign_file.c
lustre/tests/foreign_symlink_striping.c [new file with mode: 0644]
lustre/tests/sanity-lfsck.sh
lustre/tests/sanity.sh
lustre/utils/Makefile.am
lustre/utils/l_foreign_symlink.c [new file with mode: 0644]
lustre/utils/lfs.c
lustre/utils/liblustreapi.c
lustre/utils/liblustreapi_util.c