From: Sage Weil Date: Wed, 8 Mar 2017 19:45:27 +0000 (-0500) Subject: os/bluestore: no need to Onode::flush() on truncate X-Git-Tag: v12.0.1~12^2~37 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a56cd6ba38d4597381c079260901a325597b2bfb;p=ceph-ci.git 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 # Conflicts: # src/os/bluestore/BlueStore.cc --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 1fb72aca6dc..3bc22778429 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -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);