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:
Sage Weil 2017-03-08 14:45:27 -05:00
parent 83e33a32fd
commit a56cd6ba38

View File

@ -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);