]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/NewStore: don't clear overlay in the create/append case of write
authorZhiqiang Wang <zhiqiang.wang@intel.com>
Thu, 23 Apr 2015 01:41:35 +0000 (09:41 +0800)
committerSage Weil <sage@redhat.com>
Tue, 1 Sep 2015 17:39:40 +0000 (13:39 -0400)
Shouldn't clear the overlay in the create/append case of write.
Otherwise, this removes the overlay data and leads to data loss.

Signed-off-by: Zhiqiang Wang <zhiqiang.wang@intel.com>
src/os/newstore/NewStore.cc

index 6d75a3459b4cb98d41487115dd6bd882742e93a9..bcd826346776fe4bfa9590ddc36b61e4ef6c6d7a 100644 (file)
@@ -3217,7 +3217,6 @@ int NewStore::_do_write(TransContext *txc,
   if (o->onode.size <= offset ||
       o->onode.size == 0 ||
       o->onode.data_map.empty()) {
-    _do_overlay_clear(txc, o);
     uint64_t x_offset;
     if (o->onode.data_map.empty()) {
       // create