From: Loic Dachary Date: Tue, 2 Jul 2013 08:19:58 +0000 (+0200) Subject: set object_info_t pool of an ObjectContext if it is undefined or bad X-Git-Tag: v0.67-rc1~167^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a4cd631776d924e33067d6d38cae91cdc79b68ee;p=ceph.git set object_info_t pool of an ObjectContext if it is undefined or bad 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 --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 4ce0404740c8..20756b6b67cd 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -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);