Skip to content

Commit 62b71eb

Browse files
committed
Merge PR ceph#56529 into main
* refs/pull/56529/head: mds: remove unnecssary quiesce finisher variable mds: attach quiesce_path mdr to finisher at creation not dispatch Reviewed-by: Leonid Usov <[email protected]>
2 parents 63b5f53 + ed519f6 commit 62b71eb

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/mds/MDCache.cc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13766,6 +13766,7 @@ void MDCache::dispatch_quiesce_path(const MDRequestRef& mdr)
1376613766
dout(5) << __func__ << ": dispatching" << dendl;
1376713767

1376813768
C_MDS_QuiescePath* qfinisher = static_cast<C_MDS_QuiescePath*>(mdr->internal_op_finish);
13769+
ceph_assert(qfinisher->mdr == mdr);
1376913770
auto& qs = *qfinisher->qs;
1377013771
auto delay = g_conf().get_val<std::chrono::milliseconds>("mds_cache_quiesce_delay");
1377113772
auto splitauth = g_conf().get_val<bool>("mds_cache_quiesce_splitauth");
@@ -13796,8 +13797,6 @@ void MDCache::dispatch_quiesce_path(const MDRequestRef& mdr)
1379613797
return;
1379713798
}
1379813799

13799-
qfinisher->mdr = mdr;
13800-
1380113800
{
1380213801
int myrc = 0;
1380313802
for (auto& [qimdr, rc] : qs.get_failed()) {
@@ -13834,9 +13833,8 @@ void MDCache::dispatch_quiesce_path(const MDRequestRef& mdr)
1383413833
}
1383513834

1383613835
if (qfinisher) {
13837-
auto* c = mdr->internal_op_finish;
1383813836
mdr->internal_op_finish = nullptr; // prevent ::request_kill recursion
13839-
c->complete(0);
13837+
qfinisher->complete(0);
1384013838
}
1384113839
mdr->result = 0;
1384213840

@@ -13847,6 +13845,7 @@ MDRequestRef MDCache::quiesce_path(filepath p, C_MDS_QuiescePath* c, Formatter *
1384713845
MDRequestRef mdr = request_start_internal(CEPH_MDS_OP_QUIESCE_PATH);
1384813846
mdr->set_filepath(p);
1384913847
mdr->internal_op_finish = c;
13848+
c->mdr = mdr;
1385013849

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

0 commit comments

Comments
 (0)