Skip to content

Commit 612b095

Browse files
committed
mds: attach quiesce_path mdr to finisher at creation not dispatch
No functional difference but this is cleaner. Signed-off-by: Patrick Donnelly <[email protected]>
1 parent eae914f commit 612b095

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mds/MDCache.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13761,6 +13761,7 @@ void MDCache::dispatch_quiesce_path(const MDRequestRef& mdr)
1376113761
dout(5) << __func__ << ": dispatching" << dendl;
1376213762

1376313763
C_MDS_QuiescePath* qfinisher = static_cast<C_MDS_QuiescePath*>(mdr->internal_op_finish);
13764+
ceph_assert(qfinisher->mdr == mdr);
1376413765
auto& qs = *qfinisher->qs;
1376513766
auto delay = g_conf().get_val<std::chrono::milliseconds>("mds_cache_quiesce_delay");
1376613767
auto splitauth = g_conf().get_val<bool>("mds_cache_quiesce_splitauth");
@@ -13791,8 +13792,6 @@ void MDCache::dispatch_quiesce_path(const MDRequestRef& mdr)
1379113792
return;
1379213793
}
1379313794

13794-
qfinisher->mdr = mdr;
13795-
1379613795
{
1379713796
int myrc = 0;
1379813797
for (auto& [qimdr, rc] : qs.get_failed()) {
@@ -13842,6 +13841,7 @@ MDRequestRef MDCache::quiesce_path(filepath p, C_MDS_QuiescePath* c, Formatter *
1384213841
MDRequestRef mdr = request_start_internal(CEPH_MDS_OP_QUIESCE_PATH);
1384313842
mdr->set_filepath(p);
1384413843
mdr->internal_op_finish = c;
13844+
c->mdr = mdr;
1384513845

1384613846
if (delay > 0ms) {
1384713847
mds->timer.add_event_after(delay, new LambdaContext([cache=this,mdr=mdr](int r) {

0 commit comments

Comments
 (0)