mirror of
https://github.com/ceph/ceph
synced 2025-01-03 09:32:43 +00:00
Merge PR #21615 into master
* refs/pull/21615/head: ceph-fuse: Delete inode's bufferhead was in Tx state would lead a assert fail Reviewed-by: Zheng Yan <zyan@redhat.com>
This commit is contained in:
commit
b87103157e
@ -3739,7 +3739,7 @@ void Client::_invalidate_inode_cache(Inode *in, int64_t off, int64_t len)
|
||||
if (cct->_conf->client_oc) {
|
||||
vector<ObjectExtent> ls;
|
||||
Striper::file_to_extents(cct, in->ino, &in->layout, off, len, in->truncate_size, ls);
|
||||
objectcacher->discard_set(&in->oset, ls);
|
||||
objectcacher->discard_writeback(&in->oset, ls, nullptr);
|
||||
}
|
||||
|
||||
_schedule_invalidate_callback(in, off, len);
|
||||
|
@ -609,7 +609,8 @@ void ObjectCacher::Object::discard(loff_t off, loff_t len,
|
||||
bh->bl.clear();
|
||||
bh->set_nocache(true);
|
||||
oc->mark_zero(bh);
|
||||
return;
|
||||
// we should mark all Rx bh to zero
|
||||
continue;
|
||||
} else {
|
||||
assert(bh->waitfor_read.empty());
|
||||
}
|
||||
@ -2489,8 +2490,8 @@ void ObjectCacher::discard_writeback(ObjectSet *oset,
|
||||
|
||||
if (gather.has_subs()) {
|
||||
gather.set_finisher(new FunctionContext(
|
||||
[this, oset, was_dirty, on_finish](int) {
|
||||
_discard_finish(oset, was_dirty, on_finish);
|
||||
[this, oset, on_finish](int) {
|
||||
_discard_finish(oset, false, on_finish);
|
||||
}));
|
||||
gather.activate();
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user