]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
squid: mds: attach quiesce_path mdr to finisher at creation not dispatch
authorPatrick Donnelly <pdonnell@redhat.com>
Wed, 27 Mar 2024 16:04:57 +0000 (12:04 -0400)
committerLeonid Usov <leonid.usov@ibm.com>
Wed, 29 May 2024 08:41:42 +0000 (11:41 +0300)
No functional difference but this is cleaner.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 612b0957ee4eeda4f3b17ca5c3c2ca2346e8ec3d)

src/mds/MDCache.cc

index c6266701eb4f7359ba61a82d8f3cda537a559288..78e1fd310d6332084c8b0a8fbcc267e8d4519835 100644 (file)
@@ -13841,6 +13841,7 @@ void MDCache::dispatch_quiesce_path(const MDRequestRef& mdr)
   dout(5) << __func__ << ": dispatching " << *mdr << dendl;
 
   C_MDS_QuiescePath* qfinisher = static_cast<C_MDS_QuiescePath*>(mdr->internal_op_finish);
+  ceph_assert(qfinisher->mdr == mdr);
   auto& qs = *qfinisher->qs;
   auto delay = g_conf().get_val<std::chrono::milliseconds>("mds_cache_quiesce_delay");
   auto splitauth = g_conf().get_val<bool>("mds_cache_quiesce_splitauth");
@@ -13870,8 +13871,6 @@ void MDCache::dispatch_quiesce_path(const MDRequestRef& mdr)
 
   auto rootino = rooti->ino();
 
-  qfinisher->mdr = mdr;
-
   {
     int myrc = 0;
     for (auto& [qimdr, rc] : qs.get_failed()) {
@@ -13922,6 +13921,7 @@ MDRequestRef MDCache::quiesce_path(filepath p, C_MDS_QuiescePath* c, Formatter *
   MDRequestRef mdr = request_start_internal(CEPH_MDS_OP_QUIESCE_PATH);
   mdr->set_filepath(p);
   mdr->internal_op_finish = c;
+  c->mdr = mdr;
 
   if (delay > 0ms) {
     mds->timer.add_event_after(delay, new LambdaContext([cache=this,mdr=mdr](int r) {