From: Haomai Wang Date: Wed, 4 Jun 2014 04:58:07 +0000 (+0800) Subject: Fix keyvaluestore fiemap bug X-Git-Tag: v0.80.6~39^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=44721f71266e3098169ed00f1ca7e86496b76b07;p=ceph.git Fix keyvaluestore fiemap bug The result of fiemap is wrong and the offset get from "StripObjectMap::file_to_extents" need to multiply by sequence number Signed-off-by: Haomai Wang --- diff --git a/src/os/KeyValueStore.cc b/src/os/KeyValueStore.cc index d9cdd05c0646..f9a912abe99b 100644 --- a/src/os/KeyValueStore.cc +++ b/src/os/KeyValueStore.cc @@ -1673,7 +1673,8 @@ int KeyValueStore::fiemap(coll_t cid, const ghobject_t& oid, map m; for (vector::iterator iter = extents.begin(); iter != extents.end(); ++iter) { - m[iter->offset] = iter->len; + uint64_t off = iter->no * header.strip_size + iter->offset; + m[off] = iter->len; } ::encode(m, bl); return 0;