os/bluestore: fix onode vs extent key suffix #11452

Merged
merged 1 commit into from Oct 13, 2016

Projects

None yet

3 participants

@liewegas
Member

I set the extent key suffix as 'x', thinking that was
not a valid hex character and would let us quickly
identify extent keys (vs onode keys, which end with an
encoded u64). But that doesn't work: the keys encode
integer values in raw form--not in hex
(pretty_binary_string just prints it out that way in
the debug log).

Fix by appending 'o' to the onode keys, so that we will
always have a trailing 'o' or 'x' and can use the last
char reliably to determine the type.

Signed-off-by: Sage Weil sage@redhat.com

@liewegas liewegas os/bluestore: fix onode vs extent key suffix
I set the extent key suffix as 'x', thinking that was
not a valid hex character and would let us quickly
identify extent keys (vs onode keys, which end with an
encoded u64). But that doesn't work: the keys encode
integer values in raw form--not in hex
(pretty_binary_string just prints it out that way in
the debug log).

Fix by appending 'o' to the onode keys, so that we will
always have a trailing 'o' or 'x' and can use the last
char reliably to determine the type.

Signed-off-by: Sage Weil <sage@redhat.com>
d51deba
@xiexingguo
Contributor

lgtm

@ifed01 ifed01 merged commit 3d3c61d into ceph:master Oct 13, 2016

2 checks passed

Signed-off-by all commits in this PR are signed
Details
default Build finished.
Details
@liewegas liewegas deleted the liewegas:wip-bluestore-keys branch Oct 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment