]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds: fix alternate_name durability
authorPatrick Donnelly <pdonnell@redhat.com>
Fri, 15 Jan 2021 03:55:43 +0000 (19:55 -0800)
committerPatrick Donnelly <pdonnell@redhat.com>
Sat, 16 Jan 2021 01:30:40 +0000 (17:30 -0800)
commitb91490d35319b6e215cc9fc82e7ca5af55e2e309
tree7a04057be20053102acc2e1d3d62943bfb63f60f
parent9e250226a83a7075bcfef024f3e60dbb6264c942
mds: fix alternate_name durability

This is a collection of fixes to Xiubo's prior work. Namely:

- Add new mds_alternate_name_max option to limit the size of
  alternate_name. Otherwise a Client could trick the MDS into creating
  an alternate_name of any size!

- Clean up how alternate_name is assigned to CDentry. In the general
  case, this should be assigned as part of creating the dentry. We want
  this value to be immutable for the life of the dentry. Even for the
  very special case of rename(2) where the destination dentry already
  exists.  We explicitly check (after discussion with Jeff) that the
  target dentry alternate_name already matches what the rename RPC is
  giving.

- The MDS is now properly journaling the alternate_name.

- The MDS rejoin phase is properly transmitting each dentry's
  alternate_name. I've discovered that this MMDSCacheRejoin message
  actually wasn't versioned which I've raised in a tracker [1]. In the
  mean time, we'll just bump CEPH_MDS_PROTOCOL as usual.

[1] https://tracker.ceph.com/issues/48886

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
18 files changed:
src/common/options.cc
src/mds/CDentry.cc
src/mds/CDentry.h
src/mds/CDir.cc
src/mds/CDir.h
src/mds/Locker.cc
src/mds/MDCache.cc
src/mds/MDSDaemon.h
src/mds/MDSRank.cc
src/mds/Migrator.cc
src/mds/Server.cc
src/mds/Server.h
src/mds/events/EMetaBlob.h
src/mds/journal.cc
src/messages/MClientReply.h
src/messages/MClientRequest.h
src/messages/MMDSCacheRejoin.h
src/messages/MMDSPeerRequest.h