Root/
1 | /* |
2 | * Ceph - scalable distributed file system |
3 | * |
4 | * Copyright (C) 2004-2010 Sage Weil <sage@newdream.net> |
5 | * |
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. |
10 | * |
11 | */ |
12 | |
13 | #ifndef CEPH_RBD_TYPES_H |
14 | #define CEPH_RBD_TYPES_H |
15 | |
16 | #include <linux/types.h> |
17 | |
18 | /* |
19 | * rbd image 'foo' consists of objects |
20 | * foo.rbd - image metadata |
21 | * foo.00000000 |
22 | * foo.00000001 |
23 | * ... - data |
24 | */ |
25 | |
26 | #define RBD_SUFFIX ".rbd" |
27 | #define RBD_DIRECTORY "rbd_directory" |
28 | #define RBD_INFO "rbd_info" |
29 | |
30 | #define RBD_DEFAULT_OBJ_ORDER 22 /* 4MB */ |
31 | #define RBD_MIN_OBJ_ORDER 16 |
32 | #define RBD_MAX_OBJ_ORDER 30 |
33 | |
34 | #define RBD_MAX_SEG_NAME_LEN 128 |
35 | |
36 | #define RBD_COMP_NONE 0 |
37 | #define RBD_CRYPT_NONE 0 |
38 | |
39 | #define RBD_HEADER_TEXT "<<< Rados Block Device Image >>>\n" |
40 | #define RBD_HEADER_SIGNATURE "RBD" |
41 | #define RBD_HEADER_VERSION "001.005" |
42 | |
43 | struct rbd_image_snap_ondisk { |
44 | __le64 id; |
45 | __le64 image_size; |
46 | } __attribute__((packed)); |
47 | |
48 | struct rbd_image_header_ondisk { |
49 | char text[40]; |
50 | char block_name[24]; |
51 | char signature[4]; |
52 | char version[8]; |
53 | struct { |
54 | __u8 order; |
55 | __u8 crypt_type; |
56 | __u8 comp_type; |
57 | __u8 unused; |
58 | } __attribute__((packed)) options; |
59 | __le64 image_size; |
60 | __le64 snap_seq; |
61 | __le32 snap_count; |
62 | __le32 reserved; |
63 | __le64 snap_names_len; |
64 | struct rbd_image_snap_ondisk snaps[0]; |
65 | } __attribute__((packed)); |
66 | |
67 | |
68 | #endif |
69 |
Branches:
ben-wpan
ben-wpan-stefan
javiroman/ks7010
jz-2.6.34
jz-2.6.34-rc5
jz-2.6.34-rc6
jz-2.6.34-rc7
jz-2.6.35
jz-2.6.36
jz-2.6.37
jz-2.6.38
jz-2.6.39
jz-3.0
jz-3.1
jz-3.11
jz-3.12
jz-3.13
jz-3.15
jz-3.16
jz-3.18-dt
jz-3.2
jz-3.3
jz-3.4
jz-3.5
jz-3.6
jz-3.6-rc2-pwm
jz-3.9
jz-3.9-clk
jz-3.9-rc8
jz47xx
jz47xx-2.6.38
master
Tags:
od-2011-09-04
od-2011-09-18
v2.6.34-rc5
v2.6.34-rc6
v2.6.34-rc7
v3.9