diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2016-01-31 08:36:07 -0500 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2016-02-04 12:25:55 -0500 |
commit | dc6ae6d8e7726bad4f1c87244b49cac851746c65 (patch) | |
tree | 3782e77f13157c488cd9a49db5726e7411f0a2d7 /include/linux/crush | |
parent | 56a4f3091dceb7dfc14dc3ef1d5f59fe39ba4447 (diff) |
crush: add chooseleaf_stable tunable
Add a tunable to fix the bug that chooseleaf may cause unnecessary pg
migrations when some device fails.
Reflects ceph.git commit fdb3f664448e80d984470f32f04e2e6f03ab52ec.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Sage Weil <sage@redhat.com>
Diffstat (limited to 'include/linux/crush')
-rw-r--r-- | include/linux/crush/crush.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/crush/crush.h b/include/linux/crush/crush.h index 48b49305716b..be8f12b8f195 100644 --- a/include/linux/crush/crush.h +++ b/include/linux/crush/crush.h | |||
@@ -59,7 +59,8 @@ enum { | |||
59 | CRUSH_RULE_SET_CHOOSELEAF_TRIES = 9, /* override chooseleaf_descend_once */ | 59 | CRUSH_RULE_SET_CHOOSELEAF_TRIES = 9, /* override chooseleaf_descend_once */ |
60 | CRUSH_RULE_SET_CHOOSE_LOCAL_TRIES = 10, | 60 | CRUSH_RULE_SET_CHOOSE_LOCAL_TRIES = 10, |
61 | CRUSH_RULE_SET_CHOOSE_LOCAL_FALLBACK_TRIES = 11, | 61 | CRUSH_RULE_SET_CHOOSE_LOCAL_FALLBACK_TRIES = 11, |
62 | CRUSH_RULE_SET_CHOOSELEAF_VARY_R = 12 | 62 | CRUSH_RULE_SET_CHOOSELEAF_VARY_R = 12, |
63 | CRUSH_RULE_SET_CHOOSELEAF_STABLE = 13 | ||
63 | }; | 64 | }; |
64 | 65 | ||
65 | /* | 66 | /* |
@@ -205,6 +206,11 @@ struct crush_map { | |||
205 | * mappings line up a bit better with previous mappings. */ | 206 | * mappings line up a bit better with previous mappings. */ |
206 | __u8 chooseleaf_vary_r; | 207 | __u8 chooseleaf_vary_r; |
207 | 208 | ||
209 | /* if true, it makes chooseleaf firstn to return stable results (if | ||
210 | * no local retry) so that data migrations would be optimal when some | ||
211 | * device fails. */ | ||
212 | __u8 chooseleaf_stable; | ||
213 | |||
208 | #ifndef __KERNEL__ | 214 | #ifndef __KERNEL__ |
209 | /* | 215 | /* |
210 | * version 0 (original) of straw_calc has various flaws. version 1 | 216 | * version 0 (original) of straw_calc has various flaws. version 1 |