aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2012-07-30 21:15:23 -0400
committerSage Weil <sage@inktank.com>2012-07-30 21:15:23 -0400
commit546f04ef716dd49521774653d8b032a7d64c05d9 (patch)
tree162f548fc7a81b05eb1db715997b3a04693c1bcc /include/linux
parent1fe60e51a3744528f3939b1b1167ca909133d9ae (diff)
libceph: support crush tunables
The server side recently added support for tuning some magic crush variables. Decode these variables if they are present, or use the default values if they are not present. Corresponds to ceph.git commit 89af369c25f274fe62ef730e5e8aad0c54f1e5a5. Signed-off-by: caleb miles <caleb.miles@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com> Reviewed-by: Alex Elder <elder@inktank.com> Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ceph/ceph_features.h5
-rw-r--r--include/linux/crush/crush.h8
2 files changed, 12 insertions, 1 deletions
diff --git a/include/linux/ceph/ceph_features.h b/include/linux/ceph/ceph_features.h
index 342f93dbe162..dad579b0c0e6 100644
--- a/include/linux/ceph/ceph_features.h
+++ b/include/linux/ceph/ceph_features.h
@@ -12,12 +12,15 @@
12#define CEPH_FEATURE_MONNAMES (1<<5) 12#define CEPH_FEATURE_MONNAMES (1<<5)
13#define CEPH_FEATURE_RECONNECT_SEQ (1<<6) 13#define CEPH_FEATURE_RECONNECT_SEQ (1<<6)
14#define CEPH_FEATURE_DIRLAYOUTHASH (1<<7) 14#define CEPH_FEATURE_DIRLAYOUTHASH (1<<7)
15/* bits 8-17 defined by user-space; not supported yet here */
16#define CEPH_FEATURE_CRUSH_TUNABLES (1<<18)
15 17
16/* 18/*
17 * Features supported. 19 * Features supported.
18 */ 20 */
19#define CEPH_FEATURES_SUPPORTED_DEFAULT \ 21#define CEPH_FEATURES_SUPPORTED_DEFAULT \
20 (CEPH_FEATURE_NOSRCADDR) 22 (CEPH_FEATURE_NOSRCADDR | \
23 CEPH_FEATURE_CRUSH_TUNABLES)
21 24
22#define CEPH_FEATURES_REQUIRED_DEFAULT \ 25#define CEPH_FEATURES_REQUIRED_DEFAULT \
23 (CEPH_FEATURE_NOSRCADDR) 26 (CEPH_FEATURE_NOSRCADDR)
diff --git a/include/linux/crush/crush.h b/include/linux/crush/crush.h
index 7c4750811b96..25baa287cff7 100644
--- a/include/linux/crush/crush.h
+++ b/include/linux/crush/crush.h
@@ -154,6 +154,14 @@ struct crush_map {
154 __s32 max_buckets; 154 __s32 max_buckets;
155 __u32 max_rules; 155 __u32 max_rules;
156 __s32 max_devices; 156 __s32 max_devices;
157
158 /* choose local retries before re-descent */
159 __u32 choose_local_tries;
160 /* choose local attempts using a fallback permutation before
161 * re-descent */
162 __u32 choose_local_fallback_tries;
163 /* choose attempts before giving up */
164 __u32 choose_total_tries;
157}; 165};
158 166
159 167