@@ -298,8 +298,8 @@ static int crush_choose_firstn(const struct crush_map *map,
298298 const __u32 * weight , int weight_max ,
299299 int x , int numrep , int type ,
300300 int * out , int outpos ,
301- unsigned int attempts ,
302- unsigned int recurse_attempts ,
301+ unsigned int tries ,
302+ unsigned int recurse_tries ,
303303 unsigned int local_tries ,
304304 unsigned int local_fallback_tries ,
305305 int recurse_to_leaf ,
@@ -388,7 +388,7 @@ static int crush_choose_firstn(const struct crush_map *map,
388388 weight , weight_max ,
389389 x , outpos + 1 , 0 ,
390390 out2 , outpos ,
391- recurse_attempts , 0 ,
391+ recurse_tries , 0 ,
392392 local_tries ,
393393 local_fallback_tries ,
394394 0 ,
@@ -423,7 +423,7 @@ static int crush_choose_firstn(const struct crush_map *map,
423423 flocal <= in -> size + local_fallback_tries )
424424 /* exhaustive bucket search */
425425 retry_bucket = 1 ;
426- else if (ftotal <= attempts )
426+ else if (ftotal <= tries )
427427 /* then retry descent */
428428 retry_descent = 1 ;
429429 else
@@ -461,8 +461,8 @@ static void crush_choose_indep(const struct crush_map *map,
461461 const __u32 * weight , int weight_max ,
462462 int x , int left , int numrep , int type ,
463463 int * out , int outpos ,
464- unsigned int attempts ,
465- unsigned int recurse_attempts ,
464+ unsigned int tries ,
465+ unsigned int recurse_tries ,
466466 int recurse_to_leaf ,
467467 int * out2 ,
468468 int parent_r )
@@ -487,7 +487,7 @@ static void crush_choose_indep(const struct crush_map *map,
487487 out2 [rep ] = CRUSH_ITEM_UNDEF ;
488488 }
489489
490- for (ftotal = 0 ; left > 0 && ftotal < attempts ; ftotal ++ ) {
490+ for (ftotal = 0 ; left > 0 && ftotal < tries ; ftotal ++ ) {
491491 for (rep = outpos ; rep < endpos ; rep ++ ) {
492492 if (out [rep ] != CRUSH_ITEM_UNDEF )
493493 continue ;
@@ -572,7 +572,7 @@ static void crush_choose_indep(const struct crush_map *map,
572572 weight , weight_max ,
573573 x , 1 , numrep , 0 ,
574574 out2 , rep ,
575- recurse_attempts , 0 ,
575+ recurse_tries , 0 ,
576576 0 , NULL , r );
577577 if (out2 [rep ] == CRUSH_ITEM_NONE ) {
578578 /* placed nothing; no leaf */
0 commit comments