Skip to content

Commit

Permalink
os/bluestore: return onode_key to caller
Browse files Browse the repository at this point in the history
The get_key_extent_shard() method shall decompose extent_shard_key
into onode_key and offset, but currently we don't fill onode_key
and return it to caller.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
  • Loading branch information
xiexingguo committed Sep 9, 2016
1 parent 5e96f99 commit 30e6201
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/os/bluestore/BlueStore.cc
Expand Up @@ -393,7 +393,9 @@ int get_key_extent_shard(const string& key, string *onode_key, uint32_t *offset)
{
assert(key.size() > sizeof(uint32_t) + 1);
assert(key[key.size() - 1] == EXTENT_SHARD_KEY_SUFFIX);
const char *p = key.data() + key.size() - sizeof(uint32_t) - 1;
int okey_len = key.size() - sizeof(uint32_t) - 1;
*onode_key = key.substr(0, okey_len);
const char *p = key.data() + okey_len;
p = _key_decode_u32(p, offset);
return 0;
}
Expand Down

0 comments on commit 30e6201

Please sign in to comment.