Do not silence the display of shard_id when generation is NO_GEN.
Erasure coded objects JSON representation used by ceph_objectstore_tool
need the shard_id to find the file containing the chunk.
Minimal testing is added to ceph_objectstore_tool.py
http://tracker.ceph.com/issues/10063 Fixes: #10063
Signed-off-by: Loic Dachary <ldachary@redhat.com>
(cherry picked from commit
dcf09aed121f566221f539106d10283a09f15cf5)
Conflicts:
src/test/ceph_objectstore_tool.py
void ghobject_t::dump(Formatter *f) const
{
hobj.dump(f);
- if (generation != NO_GEN) {
+ if (generation != NO_GEN)
f->dump_int("generation", generation);
+ if (shard_id != ghobject_t::NO_SHARD)
f->dump_int("shard_id", shard_id);
- }
}
void ghobject_t::generate_test_instances(list<ghobject_t*>& o)