]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: add debugging when rejecting mksnap with EPERM 42935/head
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 6 Jul 2021 18:03:19 +0000 (11:03 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Thu, 26 Aug 2021 16:17:21 +0000 (12:17 -0400)
Fixes: https://tracker.ceph.com/issues/51543
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 92ec79fd57b841c54bd9a5490031f62166ed6ab1)

src/mds/Server.cc

index 37aaef04a30ae8cff1323da8bd6298a0f088e507..f4ff006c1d0542540ce7946fc7dd2e8618ff3fcb 100644 (file)
@@ -10250,6 +10250,7 @@ void Server::handle_client_mksnap(MDRequestRef& mdr)
   }
   if (!mds->mdsmap->allows_snaps()) {
     // you can't make snapshots until you set an option right now
+    dout(5) << "new snapshots are disabled for this fs" << dendl;
     respond_to_request(mdr, -CEPHFS_EPERM);
     return;
   }
@@ -10265,6 +10266,7 @@ void Server::handle_client_mksnap(MDRequestRef& mdr)
   }
   if (diri->is_system() && !diri->is_root()) {
     // no snaps in system dirs (root is ok)
+    dout(5) << "is an internal system dir" << dendl;
     respond_to_request(mdr, -CEPHFS_EPERM);
     return;
   }
@@ -10298,6 +10300,7 @@ void Server::handle_client_mksnap(MDRequestRef& mdr)
 
   if (inodeno_t subvol_ino = diri->find_snaprealm()->get_subvolume_ino();
       (subvol_ino && subvol_ino != diri->ino())) {
+    dout(5) << "is a descendent of a subvolume dir" << dendl;
     respond_to_request(mdr, -CEPHFS_EPERM);
     return;
   }