Remove redundant setting of dirty_info
Fix PG::upgrade() to conform to programming style
Set dirty_big_info in PG::write_info for upgrades
BUG: #4562
Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Sam Just <sam.just@inktank.com>
if (dirty_info) {
ObjectStore::Transaction *t = new ObjectStore::Transaction;
- dirty_info = true;
write_if_dirty(*t);
int tr = osd->store->queue_transaction(osr.get(), t);
assert(tr == 0);
write_if_dirty(*t);
}
-void PG::upgrade(
- ObjectStore *store,
- const interval_set<snapid_t> &snapcolls) {
+void PG::upgrade(ObjectStore *store, const interval_set<snapid_t> &snapcolls)
+{
unsigned removed = 0;
for (interval_set<snapid_t>::const_iterator i = snapcolls.begin();
i != snapcolls.end();
info_struct_v = cur_struct_v;
::encode(info_struct_v, attrbl);
t.collection_setattr(coll, "info", attrbl);
+ dirty_big_info = true;
}
// info. store purged_snaps separately.