Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

crush: do is_out test only if we do not collide

The is_out() test may require an additional hashing operation, so we
should skip it whenever possible.

Reflects ceph.git commit db107cc7f15cf2481894add325dc93e33479f529.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>

+1 -3
+1 -3
net/ceph/crush/mapper.c
··· 552 552 } 553 553 } 554 554 555 - if (!reject) { 555 + if (!reject && !collide) { 556 556 /* out? */ 557 557 if (itemtype == 0) 558 558 reject = is_out(map, weight, 559 559 weight_max, 560 560 item, x); 561 - else 562 - reject = 0; 563 561 } 564 562 565 563 reject: