From: Jianpeng Ma Date: Thu, 6 Aug 2015 02:32:26 +0000 (+0800) Subject: osd/ReplicatedPG: Using Hobject_t::get_head. X-Git-Tag: v9.1.0~72^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fd0a384c36f0601b221c4e2f61263dd825822074;p=ceph.git osd/ReplicatedPG: Using Hobject_t::get_head. Signed-off-by: Jianpeng Ma --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 0cea50773c7d..b72fff92fff4 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -8424,8 +8424,8 @@ int ReplicatedPG::find_object_context(const hobject_t& oid, return 0; } - hobject_t head(oid.oid, oid.get_key(), CEPH_NOSNAP, oid.get_hash(), - info.pgid.pool(), oid.get_namespace()); + hobject_t head = oid.get_head(); + // want the snapdir? if (oid.snap == CEPH_SNAPDIR) { // return head or snapdir, whichever exists.