]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: remove RBD_MAX_SEG_NAME_SIZE
authorJosh Durgin <josh.durgin@dreamhost.com>
Tue, 22 Mar 2011 21:58:15 +0000 (14:58 -0700)
committerJosh Durgin <josh.durgin@dreamhost.com>
Tue, 22 Mar 2011 21:59:11 +0000 (14:59 -0700)
The only use of this was incorrect - block_name has size RBD_MAX_BLOCK_NAME_SIZE.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
src/include/rbd_types.h
src/librbd.cc

index 5b9c16838dd598188a676800c02b929373514465..65ed21575cd1259f26e02675eef9d96de1728bca 100644 (file)
@@ -31,7 +31,6 @@
 
 #define RBD_MAX_OBJ_NAME_SIZE  96
 #define RBD_MAX_BLOCK_NAME_SIZE 24
-#define RBD_MAX_SEG_NAME_SIZE  128
 
 #define RBD_COMP_NONE          0
 #define RBD_CRYPT_NONE         0
index 5027b3ed0840a28a2ca8710f56978982dbf1d241..2ac4df28d89ddc8695f8f53afed78cb798b93d14 100644 (file)
@@ -319,8 +319,8 @@ void image_info(rbd_obj_header_ondisk& header, image_info_t& info, size_t infosi
 
 string get_block_oid(rbd_obj_header_ondisk *header, uint64_t num)
 {
-  char o[RBD_MAX_SEG_NAME_SIZE];
-  snprintf(o, RBD_MAX_SEG_NAME_SIZE,
+  char o[RBD_MAX_BLOCK_NAME_SIZE];
+  snprintf(o, RBD_MAX_BLOCK_NAME_SIZE,
        "%s.%012" PRIx64, header->block_name, num);
   return o;
 }