From: Milind Changire Date: Wed, 2 Aug 2023 08:53:18 +0000 (+0530) Subject: mds: add debug logs to monitor ceph.dir.subvolume management X-Git-Tag: v19.0.0~464^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b18e6478d160f04134f682304e15a918f13915d6;p=ceph.git mds: add debug logs to monitor ceph.dir.subvolume management Signed-off-by: Milind Changire --- diff --git a/src/mds/Server.cc b/src/mds/Server.cc index 6d91d5fcda22..4e6b5f2ff921 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -6192,6 +6192,10 @@ void Server::handle_set_vxattr(MDRequestRef& mdr, CInode *cur) inodeno_t subvol_ino = realm->get_subvolume_ino(); // can't create subvolume inside another subvolume if (subvol_ino && subvol_ino != cur->ino()) { + dout(20) << "subvol ino changed between rdlock release and xlock " + << "policylock; subvol_ino: " << subvol_ino << ", " + << "cur->ino: " << cur->ino() + << dendl; respond_to_request(mdr, -CEPHFS_EINVAL); return; } @@ -6206,10 +6210,13 @@ void Server::handle_set_vxattr(MDRequestRef& mdr, CInode *cur) auto pi = cur->project_inode(mdr, false, true); if (!srnode) pi.snapnode->created = pi.snapnode->seq = realm->get_newest_seq(); - if (val) + if (val) { + dout(20) << "marking subvolume for ino: " << cur->ino() << dendl; pi.snapnode->mark_subvolume(); - else + } else { + dout(20) << "clearing subvolume for ino: " << cur->ino() << dendl; pi.snapnode->clear_subvolume(); + } mdr->no_early_reply = true; pip = pi.inode.get();