aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/crush
diff options
context:
space:
mode:
authorIlya Dryomov <ilya.dryomov@inktank.com>2013-12-24 14:19:25 -0500
committerIlya Dryomov <ilya.dryomov@inktank.com>2013-12-31 13:32:15 -0500
commitc6d98a603a02594f6ecf16d0a0af989ae9fa7abd (patch)
tree78984357ac4b19d53b8e51ad70c81be12d50e81c /include/linux/crush
parente8ef19c4ad161768e1d8309d5ae18481c098eb81 (diff)
crush: return CRUSH_ITEM_UNDEF for failed placements with indep
For firstn mode, if we fail to make a valid placement choice, we just continue and return a short result to the caller. For indep mode, however, we need to make the position stable, and return an undefined value on failed placements to avoid shifting later results to the left. Reflects ceph.git commit b1d4dd4eb044875874a1d01c01c7d766db5d0a80. Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'include/linux/crush')
-rw-r--r--include/linux/crush/crush.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/crush/crush.h b/include/linux/crush/crush.h
index 83543c504b5a..3d6a12928560 100644
--- a/include/linux/crush/crush.h
+++ b/include/linux/crush/crush.h
@@ -19,10 +19,11 @@
19 19
20#define CRUSH_MAGIC 0x00010000ul /* for detecting algorithm revisions */ 20#define CRUSH_MAGIC 0x00010000ul /* for detecting algorithm revisions */
21 21
22
23#define CRUSH_MAX_DEPTH 10 /* max crush hierarchy depth */ 22#define CRUSH_MAX_DEPTH 10 /* max crush hierarchy depth */
24 23
25 24
25#define CRUSH_ITEM_UNDEF 0x7fffffff /* undefined result */
26
26/* 27/*
27 * CRUSH uses user-defined "rules" to describe how inputs should be 28 * CRUSH uses user-defined "rules" to describe how inputs should be
28 * mapped to devices. A rule consists of sequence of steps to perform 29 * mapped to devices. A rule consists of sequence of steps to perform