2 * Ceph - scalable distributed file system
4 * Copyright (C) 2004-2010 Sage Weil <sage@newdream.net>
6 * This is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License version 2.1, as published by the Free Software
9 * Foundation. See file COPYING.LIB.
13 #ifndef CEPH_RBD_TYPES_H
14 #define CEPH_RBD_TYPES_H
18 * rbd image 'foo' consists of objects
19 * foo.rbd - image metadata
25 #define RBD_SUFFIX ".rbd"
26 #define RBD_DIRECTORY "rbd_directory"
27 #define RBD_INFO "rbd_info"
29 #define RBD_DEFAULT_OBJ_ORDER 22 /* 4MB */
31 #define RBD_MAX_OBJ_NAME_SIZE 96
32 #define RBD_MAX_BLOCK_NAME_SIZE 24
33 #define RBD_MAX_SEG_NAME_SIZE 128
35 #define RBD_COMP_NONE 0
36 #define RBD_CRYPT_NONE 0
38 #define RBD_HEADER_TEXT "<<< Rados Block Device Image >>>\n"
39 #define RBD_HEADER_SIGNATURE "RBD"
40 #define RBD_HEADER_VERSION "001.005"
44 } __attribute__ ((packed
));
46 struct rbd_obj_snap_ondisk
{
49 } __attribute__((packed
));
51 struct rbd_obj_header_ondisk
{
53 char block_name
[RBD_MAX_BLOCK_NAME_SIZE
];
61 } __attribute__((packed
)) options
;
66 uint64_t snap_names_len
;
67 struct rbd_obj_snap_ondisk snaps
[0];
68 } __attribute__((packed
));