]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mds: dout snapdiff snapid's before validation check
authorVenky Shankar <vshankar@redhat.com>
Wed, 12 Mar 2025 05:11:57 +0000 (05:11 +0000)
committerJos Collin <jcollin@redhat.com>
Fri, 30 May 2025 16:47:06 +0000 (22:17 +0530)
As a debug aid when the snapdiff request is erroring out.

Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit ae9b0350e64e43dfd612b71435c9d288d2669a1e)

 Conflicts:
    src/mds/Server.cc
    - Resolved cherry-pick conflicts

src/mds/Server.cc

index 563f339dafce07b0449c5acdfed7f65c134273c1..4b9496fd66300835cafada89d317ca45b0549638 100644 (file)
@@ -11516,6 +11516,11 @@ void Server::handle_client_readdir_snapdiff(MDRequestRef& mdr)
   mdr->set_mds_stamp(now);
 
   mdr->snapid_diff_other = (uint64_t)req->head.args.snapdiff.snap_other;
+  dout(10) << __func__
+    << " snap " << mdr->snapid
+    << " vs. snap " << mdr->snapid_diff_other
+    << dendl;
+
   if (mdr->snapid_diff_other == mdr->snapid ||
       mdr->snapid == CEPH_NOSNAP ||
       mdr->snapid_diff_other == CEPH_NOSNAP) {
@@ -11523,11 +11528,6 @@ void Server::handle_client_readdir_snapdiff(MDRequestRef& mdr)
     respond_to_request(mdr, -CEPHFS_EINVAL);
   }
 
-  dout(10) << __func__
-    << " snap " << mdr->snapid
-    << " vs. snap " << mdr->snapid_diff_other
-    << dendl;
-
   SnapRealm* realm = diri->find_snaprealm();
 
   unsigned max = req->head.args.snapdiff.max_entries;