]> git.apps.os.sepia.ceph.com Git - ceph.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)
committerVenky Shankar <vshankar@redhat.com>
Wed, 4 Jun 2025 14:52:56 +0000 (20:22 +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)

src/mds/Server.cc

index 9902fee593242abb3cc86e648b691720828fec42..49d5fdd7efaac3ea1b7a5adf812ed1516954ece2 100644 (file)
@@ -11867,6 +11867,11 @@ void Server::handle_client_readdir_snapdiff(const 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) {
@@ -11874,11 +11879,6 @@ void Server::handle_client_readdir_snapdiff(const MDRequestRef& mdr)
     respond_to_request(mdr, -EINVAL);
   }
 
-  dout(10) << __func__
-    << " snap " << mdr->snapid
-    << " vs. snap " << mdr->snapid_diff_other
-    << dendl;
-
   unsigned max = req->head.args.snapdiff.max_entries;
   if (!max)
     max = dir->get_num_any();  // whatever, something big.