]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
set object_info_t pool of an ObjectContext if it is undefined or bad 388/head
authorLoic Dachary <loic@dachary.org>
Tue, 2 Jul 2013 08:19:58 +0000 (10:19 +0200)
committerLoic Dachary <loic@dachary.org>
Tue, 2 Jul 2013 17:40:32 +0000 (19:40 +0200)
When reading object_info_t from an existing object attribute, the pool
may be < 0 and should be set to the pool containing the object. This is done
on the oi object on the stack but overriden later by:

    obc->obs.oi.decode(bv);

This decode is superfluous and is removed so that it does not override
the modified value of the pool.

Signed-off-by: Loic Dachary <loic@dachary.org>
src/osd/ReplicatedPG.cc

index 4ce0404740c8ed1b37806df0830b4fd88a9ba05f..20756b6b67cd0b8daa8cc765078a790e04ad19f7 100644 (file)
@@ -4456,7 +4456,6 @@ ObjectContext *ReplicatedPG::get_object_context(const hobject_t& soid,
     if (can_create)
       ssc = get_snapset_context(soid.oid, soid.get_key(), soid.hash, true);
     obc = new ObjectContext(oi, true, ssc);
-    obc->obs.oi.decode(bv);
     obc->obs.exists = true;
 
     register_object_context(obc);