]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
OSD fails to start with error assert(values.size() == 2)
authorDavid Zafman <david.zafman@inktank.com>
Wed, 27 Mar 2013 18:06:07 +0000 (11:06 -0700)
committerDavid Zafman <david.zafman@inktank.com>
Wed, 27 Mar 2013 18:11:39 +0000 (11:11 -0700)
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>
src/osd/PG.cc

index 59399b704fd34ccc69fd4db35c4f93080dcc095d..427ba2b7380abfdc11e7e925c10b305bf8c39123 100644 (file)
@@ -1795,7 +1795,6 @@ void PG::_activate_committed(epoch_t e)
 
   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);
@@ -2352,9 +2351,8 @@ void PG::init(int role, vector<int>& newup, vector<int>& newacting, pg_history_t
   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();
@@ -2504,6 +2502,7 @@ void PG::write_info(ObjectStore::Transaction& t)
     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.