Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os/bluestore: fix decoding hash of bnode #10773

Merged
merged 1 commit into from Aug 19, 2016

Conversation

xiexingguo
Copy link
Member

We encode reversed bits of hash and then write it onto disk,
therefore we shall decode and then reserse to get it back.

Signed-off-by: xie xingguo xie.xingguo@zte.com.cn

@@ -276,6 +276,9 @@ static int get_key_bnode(const string& key, shard_id_t *shard,
p = _key_decode_shard(p, shard);
p = _key_decode_u64(p, (uint64_t*)pool);
*pool -= 0x8000000000000000ull;
uint32_t hash_reverse_bits;
p = _key_decode_u32(p, &hash_reverse_bits);
*hash = hobject_t::_reverse_bits(hash_reverse_bits);
p = _key_decode_u32(p, hash);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to drop this line

We encode reversed bits of hash and then write it onto disk,
therefore we shall decode and then reserse to get it back.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
@xiexingguo
Copy link
Member Author

@liewegas Sorry for the carelessness:-)

@liewegas liewegas merged commit 5422527 into ceph:master Aug 19, 2016
@liewegas
Copy link
Member

No worries. Thanks for the fix!

@xiexingguo xiexingguo deleted the xxg-wip-bluestore-2016-08-18 branch August 20, 2016 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants