diff options
Diffstat (limited to 'include/linux/ceph/osdmap.h')
-rw-r--r-- | include/linux/ceph/osdmap.h | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/include/linux/ceph/osdmap.h b/include/linux/ceph/osdmap.h index 10a417f9f76f..c819190d1642 100644 --- a/include/linux/ceph/osdmap.h +++ b/include/linux/ceph/osdmap.h | |||
@@ -18,14 +18,31 @@ | |||
18 | * The map can be updated either via an incremental map (diff) describing | 18 | * The map can be updated either via an incremental map (diff) describing |
19 | * the change between two successive epochs, or as a fully encoded map. | 19 | * the change between two successive epochs, or as a fully encoded map. |
20 | */ | 20 | */ |
21 | struct ceph_pg { | ||
22 | uint64_t pool; | ||
23 | uint32_t seed; | ||
24 | }; | ||
25 | |||
26 | #define CEPH_POOL_FLAG_HASHPSPOOL 1 | ||
27 | |||
21 | struct ceph_pg_pool_info { | 28 | struct ceph_pg_pool_info { |
22 | struct rb_node node; | 29 | struct rb_node node; |
23 | int id; | 30 | s64 id; |
24 | struct ceph_pg_pool v; | 31 | u8 type; |
25 | int pg_num_mask, pgp_num_mask, lpg_num_mask, lpgp_num_mask; | 32 | u8 size; |
33 | u8 crush_ruleset; | ||
34 | u8 object_hash; | ||
35 | u32 pg_num, pgp_num; | ||
36 | int pg_num_mask, pgp_num_mask; | ||
37 | u64 flags; | ||
26 | char *name; | 38 | char *name; |
27 | }; | 39 | }; |
28 | 40 | ||
41 | struct ceph_object_locator { | ||
42 | uint64_t pool; | ||
43 | char *key; | ||
44 | }; | ||
45 | |||
29 | struct ceph_pg_mapping { | 46 | struct ceph_pg_mapping { |
30 | struct rb_node node; | 47 | struct rb_node node; |
31 | struct ceph_pg pgid; | 48 | struct ceph_pg pgid; |
@@ -110,15 +127,16 @@ extern void ceph_osdmap_destroy(struct ceph_osdmap *map); | |||
110 | 127 | ||
111 | /* calculate mapping of a file extent to an object */ | 128 | /* calculate mapping of a file extent to an object */ |
112 | extern int ceph_calc_file_object_mapping(struct ceph_file_layout *layout, | 129 | extern int ceph_calc_file_object_mapping(struct ceph_file_layout *layout, |
113 | u64 off, u64 *plen, | 130 | u64 off, u64 len, |
114 | u64 *bno, u64 *oxoff, u64 *oxlen); | 131 | u64 *bno, u64 *oxoff, u64 *oxlen); |
115 | 132 | ||
116 | /* calculate mapping of object to a placement group */ | 133 | /* calculate mapping of object to a placement group */ |
117 | extern int ceph_calc_object_layout(struct ceph_object_layout *ol, | 134 | extern int ceph_calc_object_layout(struct ceph_pg *pg, |
118 | const char *oid, | 135 | const char *oid, |
119 | struct ceph_file_layout *fl, | 136 | struct ceph_file_layout *fl, |
120 | struct ceph_osdmap *osdmap); | 137 | struct ceph_osdmap *osdmap); |
121 | extern int ceph_calc_pg_acting(struct ceph_osdmap *osdmap, struct ceph_pg pgid, | 138 | extern int ceph_calc_pg_acting(struct ceph_osdmap *osdmap, |
139 | struct ceph_pg pgid, | ||
122 | int *acting); | 140 | int *acting); |
123 | extern int ceph_calc_pg_primary(struct ceph_osdmap *osdmap, | 141 | extern int ceph_calc_pg_primary(struct ceph_osdmap *osdmap, |
124 | struct ceph_pg pgid); | 142 | struct ceph_pg pgid); |