summaryrefslogtreecommitdiffstats
path: root/src/crush/CrushWrapper.h
diff options
context:
space:
mode:
authorxie xingguo <xie.xingguo@zte.com.cn>2019-01-19 10:19:10 +0100
committerxie xingguo <xie.xingguo@zte.com.cn>2019-01-29 03:07:03 +0100
commit5c4d241c7f796cb685e9944bf237028162122725 (patch)
treee9501bbad57cfd91a59a96198887c899548716f6 /src/crush/CrushWrapper.h
parentMerge pull request #26105 from neha-ojha/wip-37886 (diff)
downloadceph-5c4d241c7f796cb685e9944bf237028162122725.tar.xz
ceph-5c4d241c7f796cb685e9944bf237028162122725.zip
crush: fix upmap overkill
It appears that OSDMap::maybe_remove_pg_upmaps's sanity checks are overzealous. With some customized crush rules it is possible for osdmaptool to generate valid upmaps, but maybe_remove_pg_upmaps will cancel them. Fixes: http://tracker.ceph.com/issues/37968 Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
Diffstat (limited to 'src/crush/CrushWrapper.h')
-rw-r--r--src/crush/CrushWrapper.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/crush/CrushWrapper.h b/src/crush/CrushWrapper.h
index b5886f9242e..b5973d71634 100644
--- a/src/crush/CrushWrapper.h
+++ b/src/crush/CrushWrapper.h
@@ -744,12 +744,15 @@ public:
*/
void get_subtree_of_type(int type, vector<int> *subtrees);
+
/**
- * get failure-domain type of a specific crush rule
- * @param rule_id crush rule id
- * @return type of failure-domain or a negative errno on error.
- */
- int get_rule_failure_domain(int rule_id);
+ * verify upmapping results.
+ * return 0 on success or a negative errno on error.
+ */
+ int verify_upmap(CephContext *cct,
+ int rule_id,
+ int pool_size,
+ const vector<int>& up);
/**
* enumerate leaves(devices) of given node