Merge pull request #63968 from mchangir/wip-71395-tentacle

tentacle: mds: use available CInode* for uninline data
This commit is contained in:
Kotresh HR 2025-07-28 18:03:55 +05:30 committed by GitHub
commit 2dc85a5ad5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 6 deletions

View File

@ -13249,7 +13249,7 @@ class C_MDC_DataUninlinedSubmitted : public MDCacheLogContext {
void finish(int r) {
auto mds = get_mds(); // to keep dout happy
auto in = mds->server->rdlock_path_pin_ref(mdr, true);
auto in = mdr->in[0];
ceph_assert(in != nullptr);
@ -13266,6 +13266,7 @@ class C_MDC_DataUninlinedSubmitted : public MDCacheLogContext {
h->record_uninline_passed();
in->uninline_finished();
mdr->apply();
in->auth_unpin(this); // for uninline data
mds->server->respond_to_request(mdr, r);
}
};
@ -13282,7 +13283,9 @@ struct C_IO_DataUninlined : public MDSIOContext {
void finish(int r) override {
auto mds = get_mds(); // to keep dout/derr happy
auto in = mds->server->rdlock_path_pin_ref(mdr, true);
auto in = mdr->in[0];
ceph_assert(in != nullptr);
// return faster if operation has failed (non-zero) status
if (r) {
@ -13296,6 +13299,7 @@ struct C_IO_DataUninlined : public MDSIOContext {
in->make_path_string(path);
h->record_uninline_status(in->ino(), r, path);
in->uninline_finished();
in->auth_unpin(this); // for uninline data
mds->server->respond_to_request(mdr, r);
return;
}
@ -13337,11 +13341,9 @@ struct C_IO_DataUninlined : public MDSIOContext {
void MDCache::uninline_data_work(MDRequestRef mdr)
{
CInode *in = mds->server->rdlock_path_pin_ref(mdr, true);
CInode *in = mdr->in[0];
if (!in) {
return;
}
ceph_assert(in != nullptr);
MutationImpl::LockOpVec lov;
lov.add_xlock(&in->authlock);
@ -13356,6 +13358,7 @@ void MDCache::uninline_data_work(MDRequestRef mdr)
if (!in->has_inline_data()) {
dout(20) << "(uninline_data) inode doesn't have inline data anymore " << *in << dendl;
in->uninline_finished();
in->auth_unpin(this); // for uninline_data
mds->server->respond_to_request(mdr, 0);
return;
}

View File

@ -1382,7 +1382,9 @@ void ScrubStack::uninline_data(CInode *in, Context *fin)
mdr->snapid = CEPH_NOSNAP;
mdr->no_early_reply = true;
mdr->internal_op_finish = fin;
mdr->in[0] = in;
in->auth_pin(this);
in->mdcache->dispatch_request(mdr);
}