aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-02-23 13:41:09 -0500
committerSage Weil <sage@inktank.com>2013-02-26 18:02:25 -0500
commit4f6a7e5ee1393ec4b243b39dac9f36992d161540 (patch)
tree547684ad1dc0e1e3e376e958ab74e164d6972623 /include/linux
parentec73a754989c27628c9037887df919561280519c (diff)
ceph: update support for PGID64, PGPOOL3, OSDENC protocol features
Support (and require) the PGID64, PGPOOL3, and OSDENC protocol features. These have been present in ceph.git since v0.42, Feb 2012. Require these features to simplify support; nobody is running older userspace. Note that the new request and reply encoding is still not in place, so the new code is not yet functional. Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Alex Elder <elder@inktank.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ceph/ceph_features.h14
-rw-r--r--include/linux/ceph/mdsmap.h4
-rw-r--r--include/linux/ceph/osdmap.h16
-rw-r--r--include/linux/ceph/rados.h23
4 files changed, 25 insertions, 32 deletions
diff --git a/include/linux/ceph/ceph_features.h b/include/linux/ceph/ceph_features.h
index 9e0f5a8ba247..ab0a54286e0d 100644
--- a/include/linux/ceph/ceph_features.h
+++ b/include/linux/ceph/ceph_features.h
@@ -39,11 +39,17 @@
39 * Features supported. 39 * Features supported.
40 */ 40 */
41#define CEPH_FEATURES_SUPPORTED_DEFAULT \ 41#define CEPH_FEATURES_SUPPORTED_DEFAULT \
42 (CEPH_FEATURE_NOSRCADDR | \ 42 (CEPH_FEATURE_NOSRCADDR | \
43 CEPH_FEATURE_CRUSH_TUNABLES | \ 43 CEPH_FEATURE_PGID64 | \
44 CEPH_FEATURE_CRUSH_TUNABLES2 | \ 44 CEPH_FEATURE_PGPOOL3 | \
45 CEPH_FEATURE_OSDENC | \
46 CEPH_FEATURE_CRUSH_TUNABLES | \
47 CEPH_FEATURE_CRUSH_TUNABLES2 | \
45 CEPH_FEATURE_REPLY_CREATE_INODE) 48 CEPH_FEATURE_REPLY_CREATE_INODE)
46 49
47#define CEPH_FEATURES_REQUIRED_DEFAULT \ 50#define CEPH_FEATURES_REQUIRED_DEFAULT \
48 (CEPH_FEATURE_NOSRCADDR) 51 (CEPH_FEATURE_NOSRCADDR | \
52 CEPH_FEATURE_PGID64 | \
53 CEPH_FEATURE_PGPOOL3 | \
54 CEPH_FEATURE_OSDENC)
49#endif 55#endif
diff --git a/include/linux/ceph/mdsmap.h b/include/linux/ceph/mdsmap.h
index cb15b5d867c7..87ed09f54800 100644
--- a/include/linux/ceph/mdsmap.h
+++ b/include/linux/ceph/mdsmap.h
@@ -29,8 +29,8 @@ struct ceph_mdsmap {
29 29
30 /* which object pools file data can be stored in */ 30 /* which object pools file data can be stored in */
31 int m_num_data_pg_pools; 31 int m_num_data_pg_pools;
32 u32 *m_data_pg_pools; 32 u64 *m_data_pg_pools;
33 u32 m_cas_pg_pool; 33 u64 m_cas_pg_pool;
34}; 34};
35 35
36static inline struct ceph_entity_addr * 36static inline struct ceph_entity_addr *
diff --git a/include/linux/ceph/osdmap.h b/include/linux/ceph/osdmap.h
index 8a612df4c248..8587746b7f0e 100644
--- a/include/linux/ceph/osdmap.h
+++ b/include/linux/ceph/osdmap.h
@@ -25,12 +25,22 @@ struct ceph_pg {
25 25
26struct ceph_pg_pool_info { 26struct ceph_pg_pool_info {
27 struct rb_node node; 27 struct rb_node node;
28 int id; 28 s64 id;
29 struct ceph_pg_pool v; 29 u8 type;
30 int pg_num_mask, pgp_num_mask, lpg_num_mask, lpgp_num_mask; 30 u8 size;
31 u8 crush_ruleset;
32 u8 object_hash;
33 u32 pg_num, pgp_num;
34 int pg_num_mask, pgp_num_mask;
35 u64 flags;
31 char *name; 36 char *name;
32}; 37};
33 38
39struct ceph_object_locator {
40 uint64_t pool;
41 char *key;
42};
43
34struct ceph_pg_mapping { 44struct ceph_pg_mapping {
35 struct rb_node node; 45 struct rb_node node;
36 struct ceph_pg pgid; 46 struct ceph_pg pgid;
diff --git a/include/linux/ceph/rados.h b/include/linux/ceph/rados.h
index e7cece69b13f..d784c8dfb09a 100644
--- a/include/linux/ceph/rados.h
+++ b/include/linux/ceph/rados.h
@@ -9,14 +9,6 @@
9#include <linux/ceph/msgr.h> 9#include <linux/ceph/msgr.h>
10 10
11/* 11/*
12 * osdmap encoding versions
13 */
14#define CEPH_OSDMAP_INC_VERSION 5
15#define CEPH_OSDMAP_INC_VERSION_EXT 6
16#define CEPH_OSDMAP_VERSION 5
17#define CEPH_OSDMAP_VERSION_EXT 6
18
19/*
20 * fs id 12 * fs id
21 */ 13 */
22struct ceph_fsid { 14struct ceph_fsid {
@@ -91,21 +83,6 @@ struct ceph_pg_v1 {
91 83
92#define CEPH_PG_TYPE_REP 1 84#define CEPH_PG_TYPE_REP 1
93#define CEPH_PG_TYPE_RAID4 2 85#define CEPH_PG_TYPE_RAID4 2
94#define CEPH_PG_POOL_VERSION 2
95struct ceph_pg_pool {
96 __u8 type; /* CEPH_PG_TYPE_* */
97 __u8 size; /* number of osds in each pg */
98 __u8 crush_ruleset; /* crush placement rule */
99 __u8 object_hash; /* hash mapping object name to ps */
100 __le32 pg_num, pgp_num; /* number of pg's */
101 __le32 lpg_num, lpgp_num; /* number of localized pg's */
102 __le32 last_change; /* most recent epoch changed */
103 __le64 snap_seq; /* seq for per-pool snapshot */
104 __le32 snap_epoch; /* epoch of last snap */
105 __le32 num_snaps;
106 __le32 num_removed_snap_intervals; /* if non-empty, NO per-pool snaps */
107 __le64 auid; /* who owns the pg */
108} __attribute__ ((packed));
109 86
110/* 87/*
111 * stable_mod func is used to control number of placement groups. 88 * stable_mod func is used to control number of placement groups.