]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
os/bluestore: no need to Onode::flush() on truncate
authorSage Weil <sage@redhat.com>
Wed, 8 Mar 2017 19:45:27 +0000 (14:45 -0500)
committerSage Weil <sage@redhat.com>
Tue, 21 Mar 2017 18:56:27 +0000 (13:56 -0500)
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

src/os/bluestore/BlueStore.cc

index 1fb72aca6dc8f170777ce5f82d0e5903fbf1223b..3bc22778429b79ae0d92af00cb2bf4a1ab84d48e 100644 (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);