ceph-objectstore-tool: drop head_exists corruption

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2017-09-07 15:09:04 -04:00
parent 76f1c14c77
commit c6275e7d4d

View File

@ -2086,14 +2086,6 @@ int clear_snapset(ObjectStore *store, coll_t coll, ghobject_t &ghobj,
if (ret < 0)
return ret;
// Use "head" to set head_exists incorrectly
if (arg == "corrupt" || arg == "head")
ss.head_exists = !ghobj.hobj.is_head();
else if (ss.head_exists != ghobj.hobj.is_head()) {
cerr << "Correcting head_exists, set to "
<< (ghobj.hobj.is_head() ? "true" : "false") << std::endl;
ss.head_exists = ghobj.hobj.is_head();
}
// Use "corrupt" to clear entire SnapSet
// Use "seq" to just corrupt SnapSet.seq
if (arg == "corrupt" || arg == "seq")