From eb217558a9d7541ebc8705d8d00d7072c9ed07f9 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Mon, 21 Nov 2016 15:37:25 -0800 Subject: [PATCH] ECTransaction: only write out the hinfo if not delete Fixes: http://tracker.ceph.com/issues/17983 Signed-off-by: Samuel Just --- src/osd/ECTransaction.cc | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/osd/ECTransaction.cc b/src/osd/ECTransaction.cc index f808162caaf..4cb76d0f4ea 100644 --- a/src/osd/ECTransaction.cc +++ b/src/osd/ECTransaction.cc @@ -643,14 +643,16 @@ void ECTransaction::generate_transactions( entry->mod_desc.append(append_after); } - bufferlist hbuf; - ::encode(*hinfo, hbuf); - for (auto &&i : *transactions) { - i.second.setattr( - coll_t(spg_t(pgid, i.first)), - ghobject_t(oid, ghobject_t::NO_GEN, i.first), - ECUtil::get_hinfo_key(), - hbuf); + if (!op.is_delete()) { + bufferlist hbuf; + ::encode(*hinfo, hbuf); + for (auto &&i : *transactions) { + i.second.setattr( + coll_t(spg_t(pgid, i.first)), + ghobject_t(oid, ghobject_t::NO_GEN, i.first), + ECUtil::get_hinfo_key(), + hbuf); + } } }); } -- 2.39.5