]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
kstore: flush before we really start a truncate
authorxie xingguo <xie.xingguo@zte.com.cn>
Fri, 29 Jan 2016 10:40:37 +0000 (18:40 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Fri, 29 Jan 2016 11:35:47 +0000 (19:35 +0800)
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/os/kstore/KStore.cc

index 895ea1562ddf38f2b64ba6098efcd8a23d14d128..fbf72da2574ae17b892ed8b2cbf3814706b5b76a 100644 (file)
@@ -3084,6 +3084,8 @@ int KStore::_do_truncate(TransContext *txc, OnodeRef o, uint64_t offset)
 {
   uint64_t stripe_size = o->onode.stripe_size;
 
+  o->flush();
+
   // trim down stripes
   if (stripe_size) {
     uint64_t pos = offset;