]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crush/mapper: generalize descend_once
authorSage Weil <sage@inktank.com>
Tue, 17 Dec 2013 05:33:07 +0000 (21:33 -0800)
committerSage Weil <sage@inktank.com>
Tue, 17 Dec 2013 05:33:07 +0000 (21:33 -0800)
commit685c6950ef3df325ef04ce7c986e36ca2514c5f1
tree81baa7e3510b332bbe161f42a617a9e0925e600a
parent6f431200e393434475200b921f98c76dccde56e2
crush/mapper: generalize descend_once

The legacy behavior is to make the normal number of tries for the
recursive chooseleaf call.  The descend_once tunable changed this to
making a single try and bail if we get a reject (note that it is
impossible to collide in the recursive case).

The new set_chooseleaf_tries lets you select the number of recursive
chooseleaf attempts for indep mode, or default to 1.  Use the same
behavior for firstn, except default to total_tries when the legacy
tunables are set (for compatibility).  This makes the rule step
override the (new) default of 1 recursive attempt, keeping behavior
consistent with indep mode.

Signed-off-by: Sage Weil <sage@inktank.com>
src/crush/mapper.c