]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore/BlueStore: For _zero, check whether clear tail_bl. 8289/head
authorJianpeng Ma <jianpeng.ma@intel.com>
Thu, 24 Mar 2016 12:07:15 +0000 (20:07 +0800)
committerJianpeng Ma <jianpeng.ma@intel.com>
Thu, 24 Mar 2016 12:07:15 +0000 (20:07 +0800)
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
src/os/bluestore/BlueStore.cc

index 52f9055083ceb60281fcc5ca98457cc222770f7f..ce1dca18383b71b84c9913c08000a6fe0b8363dd 100644 (file)
@@ -5741,6 +5741,11 @@ int BlueStore::_zero(TransContext *txc,
     ++bp;
   }
 
+  if (o->tail_bl.length() && offset + length > o->tail_offset) {
+    dout(20) << __func__ << " clearing cached tail" << dendl;
+    o->clear_tail();
+  }
+
   if (offset + length > o->onode.size) {
     o->onode.size = offset + length;
     dout(20) << __func__ << " extending size to " << offset + length