From: Patrick Donnelly Date: Fri, 15 Jan 2021 03:55:43 +0000 (-0800) Subject: mds: fix alternate_name durability X-Git-Tag: v16.1.0~9^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b91490d35319b6e215cc9fc82e7ca5af55e2e309;p=ceph.git 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 --- diff --git a/src/common/options.cc b/src/common/options.cc index 71133bdfb81d..d0a2104c4548 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -7953,6 +7953,11 @@ static std::vector