]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crush: fix fast rule lookup when uniform 17510/head
authorSage Weil <sage@redhat.com>
Wed, 6 Sep 2017 02:25:03 +0000 (22:25 -0400)
committerSage Weil <sage@redhat.com>
Wed, 6 Sep 2017 02:27:05 +0000 (22:27 -0400)
commitf24095e0e9734531dbdbcd4bff1392c463188e8e
tree75ab00aa361fb4a06bc9fa201c4640e85d56e327
parentf0f93c6645526b36793c320f317591b51f945831
crush: fix fast rule lookup when uniform

Older clients will search for the first rule with a matching ruleset,
type, and size.  The has_uniform_rules bool is only set if we have rule
ids and rulesets that line up, but we must also verify that the rest of the
mask matches or else we can get a different CRUSH mapping result because
the mask might not match and old clients will fail to find a rule and we
will find one.  We also can't just check the ruleset as the legacy clients
find the *first* (of potentially many) matching rules; hence we only do
the fast check if all rulesets == rule id.

Signed-off-by: Sage Weil <sage@redhat.com>
src/crush/CrushWrapper.h