From b18e6478d160f04134f682304e15a918f13915d6 Mon Sep 17 00:00:00 2001 From: Milind Changire Date: Wed, 2 Aug 2023 14:23:18 +0530 Subject: [PATCH] mds: add debug logs to monitor ceph.dir.subvolume management Signed-off-by: Milind Changire --- src/mds/Server.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/mds/Server.cc b/src/mds/Server.cc index 6d91d5fcda227..4e6b5f2ff921a 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(); -- 2.39.5