From 74e997c75b9129073962d8e74baccd26e8520dd9 Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Tue, 6 Jul 2021 11:03:19 -0700 Subject: [PATCH] mds: add debugging when rejecting mksnap with EPERM Fixes: https://tracker.ceph.com/issues/51543 Signed-off-by: Patrick Donnelly (cherry picked from commit 92ec79fd57b841c54bd9a5490031f62166ed6ab1) --- src/mds/Server.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mds/Server.cc b/src/mds/Server.cc index 37aaef04a30a..f4ff006c1d05 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -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; } -- 2.47.3