Commit 80e14dea authored by Josh Durgin's avatar Josh Durgin Committed by Greg Kroah-Hartman
Browse files

rbd: use the correct length for format 2 object names



commit 3a96d5cd upstream.

[Backported for 3.9-stable.
'kmalloc(MAX_OBJ_NAME_SIZE + 1, GFP_NOIO)' was changed as
'kmem_cache_alloc(rbd_segment_name_cache, GFP_NOIO)' in 78c2a44a
since 3.10-rc1, and 78c2a44a is relied on a big patchset, so restore
it as 3.9 did.]

Format 2 objects use 16 characters for the object name suffix to be
able to express the full 64-bit range of object numbers. Format 1
images only use 12 characters for this. Using 12-character names for
format 2 caused userspace and kernel rbd clients to read differently
named objects, which made an image written by one client look empty to
the other client.

Reported-by: default avatarChris Dunlop <chris@onthe.net.au>
Signed-off-by: default avatarJosh Durgin <josh.durgin@inktank.com>
Reviewed-by: default avatarSage Weil <sage@inktank.com>
Reviewed-by: default avatarLingzhu Xiang <lxiang@redhat.com>
Signed-off-by: default avatarZhouping Liu <zliu@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8900341a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment