]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds: add alternate_name feature support for dentries
authorXiubo Li <xiubli@redhat.com>
Mon, 21 Sep 2020 04:55:31 +0000 (12:55 +0800)
committerPatrick Donnelly <pdonnell@redhat.com>
Sat, 16 Jan 2021 01:30:39 +0000 (17:30 -0800)
commit9e250226a83a7075bcfef024f3e60dbb6264c942
tree1b60b43f16a0b3876bb0f1f9b7a52202a8687184
parentbd0b90ffbfe528c0f85100837ca1e7ab56e10b82
mds: add alternate_name feature support for dentries

This will support the "alternate_name" filename support, and will save
an alternate name for each dentry. This alternate name is not used in
path lookup or for any other usual file system purpose. The name is
simply an added blob of metadata on the dentry that is distributed to
clients so that "long" file names may be supported for clients which
require them. In the case of an fscrypt enhanced kernel mount driver,
the long name may be the cyphertext (exceeding FILENAME_MAX) of a long
file name.

Because this affects only files with long file names, the use of this
feature should be rare but could be common for some unusual
applications.

The client mount should check the CEPHFS_FEATURE_ALTERNATE_NAME feature
bit first to check whether the MDS has support for this feature or not.
The alternate_name is transmitted as part of the message payload in
MClientRequest when setting the alternate_name. The LeaseStat structure
in MClientReply contains the alternate_name.

When executing a metadata mutation RPC, the client will set the
alternate_name (if it exists) as part of the operation. The MDS will
pick that up and set it on the new or mutated dentry.

Fixes: https://tracker.ceph.com/issues/47162
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
16 files changed:
src/client/Client.cc
src/client/Dentry.h
src/mds/CDentry.cc
src/mds/CDentry.h
src/mds/CDir.cc
src/mds/CDir.h
src/mds/Locker.cc
src/mds/Migrator.cc
src/mds/Server.cc
src/mds/cephfs_features.cc
src/mds/cephfs_features.h
src/messages/MClientReply.h
src/messages/MClientRequest.h
src/tools/cephfs/DataScan.cc
src/tools/cephfs/JournalTool.cc
src/tools/cephfs/MetaTool.cc