]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: do not wrap ceph special names
authorPatrick Donnelly <pdonnell@ibm.com>
Tue, 11 Mar 2025 14:18:12 +0000 (10:18 -0400)
committerChristopher Hoffman <choffman@redhat.com>
Wed, 5 Nov 2025 13:59:35 +0000 (13:59 +0000)
This avoids encrypting .snap which prevents Client::_lookup from opening the
snapdir.

Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
src/client/Client.cc

index 64ae9a5dc38882c9275c49b307362918b57bcb40..d8cb7e1cf3242fcf2d9c099bf0d01186b37b74e4 100644 (file)
@@ -1320,6 +1320,11 @@ bool Client::_wrap_name(Inode& diri, std::string& dname, std::string& alternate_
   ceph_assert(dname.size() > 0);
   alternate_name = "";
 
+  if (dname == cct->_conf->client_snapdir) {
+    ldout(cct, 25) << __func__ << ": is special name" << dendl;
+    return true;
+  }
+
   if (diri.has_charmap()) {
     auto& cs = diri.get_charmap();
     ldout(cct, 25) << __func__ << ":  " << cs << dendl;