From: Sage Weil Date: Tue, 18 Aug 2015 19:16:45 +0000 (-0400) Subject: os/GenericObjectMap: use bitwise hash, not nibblewise X-Git-Tag: v9.1.0~324^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=11946129ef62ac79c7ea6ba81cddcc73d4bcc0e2;p=ceph.git os/GenericObjectMap: use bitwise hash, not nibblewise Signed-off-by: Sage Weil --- diff --git a/src/os/GenericObjectMap.cc b/src/os/GenericObjectMap.cc index c289ae210421..7df0fb05c766 100644 --- a/src/os/GenericObjectMap.cc +++ b/src/os/GenericObjectMap.cc @@ -133,7 +133,7 @@ string GenericObjectMap::header_key(const coll_t &cid, const ghobject_t &oid) t = buf; snprintf(t, end - t, "%.*X", (int)(sizeof(oid.hobj.get_hash())*2), - (uint32_t)oid.get_nibblewise_key_u32()); + oid.hobj.get_bitreverse_key_u32()); full_name += string(buf); full_name.append(GHOBJECT_KEY_SEP_S); @@ -262,10 +262,10 @@ bool GenericObjectMap::parse_header_key(const string &long_name, } if (out) { - (*out) = ghobject_t(hobject_t(name, key, snap, hash, (int64_t)pool, ns), + (*out) = ghobject_t(hobject_t(name, key, snap, + hobject_t::_reverse_bits(hash), + (int64_t)pool, ns), generation, shard_id); - // restore reversed hash. see calculate_key - out->hobj.set_hash(out->get_nibblewise_key()); } if (out_coll) {