Reflects ceph.git commit 4551fee9ad89d0427ed865d766d0d44004d3e3e1.

Signed-off-by: Ilya Dryomov <[email protected]>
---
 net/ceph/crush/mapper.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/net/ceph/crush/mapper.c b/net/ceph/crush/mapper.c
index caeb1066bea3..77b7a73e65cf 100644
--- a/net/ceph/crush/mapper.c
+++ b/net/ceph/crush/mapper.c
@@ -514,6 +514,14 @@ static void crush_choose_indep(const struct crush_map *map,
 
                        /* choose through intervening buckets */
                        for (;;) {
+                               /* note: we base the choice on the position
+                                * even in the nested call.  that means that
+                                * if the first layer chooses the same bucket
+                                * in a different position, we will tend to
+                                * choose a different item in that bucket.
+                                * this will involve more devices in data
+                                * movement and tend to distribute the load.
+                                */
                                r = rep;
 
                                /* be careful */
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to