]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: add debug logs to monitor ceph.dir.subvolume management 52631/head
authorMilind Changire <mchangir@redhat.com>
Wed, 2 Aug 2023 08:53:18 +0000 (14:23 +0530)
committerMilind Changire <mchangir@redhat.com>
Wed, 2 Aug 2023 08:53:18 +0000 (14:23 +0530)
Signed-off-by: Milind Changire <mchangir@redhat.com>
src/mds/Server.cc

index 6d91d5fcda227c6b151b0fd908df8c3a60a692e7..4e6b5f2ff921adc2f3136d2a01e7fb5cb9ec994e 100644 (file)
@@ -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();