]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ECTransaction: only write out the hinfo if not delete 12141/head
authorSamuel Just <sjust@redhat.com>
Mon, 21 Nov 2016 23:37:25 +0000 (15:37 -0800)
committerSamuel Just <sjust@redhat.com>
Mon, 21 Nov 2016 23:37:26 +0000 (15:37 -0800)
Fixes: http://tracker.ceph.com/issues/17983
Signed-off-by: Samuel Just <sjust@redhat.com>
src/osd/ECTransaction.cc

index f808162caaf405d91aa21f75ddebd07b4a8b80df..4cb76d0f4eaa01dace306a2f67be7d65413f36d4 100644 (file)
@@ -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);
+       }
       }
     });
 }