diff options
author | Ilya Dryomov <ilya.dryomov@inktank.com> | 2013-12-24 21:19:26 +0200 |
---|---|---|
committer | Ilya Dryomov <ilya.dryomov@inktank.com> | 2013-12-31 20:32:22 +0200 |
commit | f18650ace38ef200dd1578257c75e9407297953c (patch) | |
tree | 252f8675255569d1ab376b652cbb3c17332f36ca /include | |
parent | be3226acc5544bcc91e756eb3ee6ca7b74f6f0a8 (diff) | |
download | op-kernel-dev-f18650ace38ef200dd1578257c75e9407297953c.zip op-kernel-dev-f18650ace38ef200dd1578257c75e9407297953c.tar.gz |
crush: apply chooseleaf_tries to firstn mode too
Parameterize the attempts for the _firstn choose method, and apply the
rule-specified tries count to firstn mode as well. Note that we have
slightly different behavior here than with indep:
If the firstn value is not specified for firstn, we pass through the
normal attempt count. This maintains compatibility with legacy behavior.
Note that this is usually *not* actually N^2 work, though, because of the
descend_once tunable. However, descend_once is unfortunately *not* the
same thing as 1 chooseleaf try because it is only checked on a reject but
not on a collision. Sigh.
In contrast, for indep, if tries is not specified we default to 1
recursive attempt, because that is simply more sane, and we have the
option to do so. The descend_once tunable has no effect for indep.
Reflects ceph.git commit 64aeded50d80942d66a5ec7b604ff2fcbf5d7b63.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/crush/crush.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/crush/crush.h b/include/linux/crush/crush.h index 2e50bab..07b8fd4 100644 --- a/include/linux/crush/crush.h +++ b/include/linux/crush/crush.h @@ -165,7 +165,10 @@ struct crush_map { __u32 choose_local_fallback_tries; /* choose attempts before giving up */ __u32 choose_total_tries; - /* attempt chooseleaf inner descent once; on failure retry outer descent */ + /* attempt chooseleaf inner descent once for firstn mode; on + * reject retry outer descent. Note that this does *not* + * apply to a collision: in that case we will retry as we used + * to. */ __u32 chooseleaf_descend_once; }; |