mirror of
https://github.com/ceph/ceph
synced 2025-01-20 10:01:45 +00:00
os/bluestore: no need to Onode::flush() on truncate
We do not release extents until after any deferred IO, so this flush() is unnecessary. Signed-off-by: Sage Weil <sage@redhat.com> # Conflicts: # src/os/bluestore/BlueStore.cc
This commit is contained in:
parent
83e33a32fd
commit
a56cd6ba38
@ -9209,10 +9209,6 @@ int BlueStore::_do_zero(TransContext *txc,
|
||||
|
||||
_dump_onode(o);
|
||||
|
||||
// ensure any deferred IO has completed before we truncate off any extents
|
||||
// they may touch.
|
||||
o->flush();
|
||||
|
||||
WriteContext wctx;
|
||||
o->extent_map.fault_range(db, offset, length);
|
||||
o->extent_map.punch_hole(offset, length, &wctx.old_extents);
|
||||
@ -9244,10 +9240,6 @@ int BlueStore::_do_truncate(
|
||||
return 0;
|
||||
|
||||
if (offset < o->onode.size) {
|
||||
// ensure any deferred IO has completed before we truncate off any extents
|
||||
// they may touch.
|
||||
o->flush();
|
||||
|
||||
WriteContext wctx;
|
||||
uint64_t length = o->onode.size - offset;
|
||||
o->extent_map.fault_range(db, offset, length);
|
||||
|
Loading…
Reference in New Issue
Block a user