From: Patrick Donnelly Date: Tue, 6 Jul 2021 18:03:19 +0000 (-0700) Subject: mds: add debugging when rejecting mksnap with EPERM X-Git-Tag: v16.2.6~29^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F42935%2Fhead;p=ceph.git 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) --- diff --git a/src/mds/Server.cc b/src/mds/Server.cc index 37aaef04a30..f4ff006c1d0 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; }