os/NewStore: don't clear overlay in the create/append case of write

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>
This commit is contained in:
Zhiqiang Wang 2015-04-23 09:41:35 +08:00 committed by Sage Weil
parent f9f9e1b105
commit dffa43051a

View 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