ceph/ceph — pull request #388 by dachary (2013-07-02 16:47:50+00:00)
Title: 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);

The oi object on the stack is removed and the pool of obc->obs.oi.oloc
is fixed, if necessary. The object_info_t is only decoded once instead
of twice. The ObjectContext constructor only copies the object_info_t
to a data member and does not make use of it. The object_info_t
constructor used by the oi variable on the stack is exactly equivalent
to creating the object with the default constructor and calling the
decode() immediately afterwards.

Signed-off-by: Loic Dachary