diff options
author | Stratos Psomadakis <psomas@grnet.gr> | 2011-11-10 15:45:37 +0200 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2011-11-11 09:50:19 -0800 |
commit | 224736d9113ab4a7cf3f05c05377492bd99b4b02 (patch) | |
tree | 0a8fe8063e904eebc2f591607faf8711b78016f8 /include | |
parent | 774ac21da76f5c3018428725074e27a3fd40b128 (diff) | |
download | linux-stable-224736d9113ab4a7cf3f05c05377492bd99b4b02.tar.gz linux-stable-224736d9113ab4a7cf3f05c05377492bd99b4b02.tar.bz2 linux-stable-224736d9113ab4a7cf3f05c05377492bd99b4b02.zip |
libceph: Allocate larger oid buffer in request msgs
ceph_osd_request struct allocates a 40-byte buffer for object names.
RBD image names can be up to 96 chars long (100 with the .rbd suffix),
which results in the object name for the image being truncated, and a
subsequent map failure.
Increase the oid buffer in request messages, in order to avoid the
truncation.
Signed-off-by: Stratos Psomadakis <psomas@grnet.gr>
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ceph/osd_client.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h index f88eacb111d4..7c05ac202d90 100644 --- a/include/linux/ceph/osd_client.h +++ b/include/linux/ceph/osd_client.h @@ -10,6 +10,12 @@ #include "osdmap.h" #include "messenger.h" +/* + * Maximum object name size + * (must be at least as big as RBD_MAX_MD_NAME_LEN -- currently 100) + */ +#define MAX_OBJ_NAME_SIZE 100 + struct ceph_msg; struct ceph_snap_context; struct ceph_osd_request; @@ -75,7 +81,7 @@ struct ceph_osd_request { struct inode *r_inode; /* for use by callbacks */ void *r_priv; /* ditto */ - char r_oid[40]; /* object name */ + char r_oid[MAX_OBJ_NAME_SIZE]; /* object name */ int r_oid_len; unsigned long r_stamp; /* send OR check time */ |