mirror of
https://github.com/ceph/ceph
synced 2026-08-02 07:03:18 +00:00
Merge pull request #63968 from mchangir/wip-71395-tentacle
tentacle: mds: use available CInode* for uninline data
This commit is contained in:
commit
2dc85a5ad5
@ -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;
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user