md/raid10: optimize read_balance() for 'far offset' arrays
PATCH 1/1 md/raid10: optimize read_balance() for 'far offset' arrays
If @conf->far_offset > 0, there is only 1 stripe so that we can treat the array same as 'near' arrays.
Signed-off-by Namhyung Kim <[email protected]>
--- drivers/md/raid10.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/md/raid10.c +1 -1
@@ -531,7 +531,7 @@ retry:break ;/* for far > 1 always use the lowest address */ -if (conf->far_copies >1 ) +if (conf->far_copies >1 && conf->far_offset ==0 ) new_distance = r10_bio->devs[slot].addr;else new_distance = abs(r10_bio->devs[slot].addr -
Signature · 1 line
1.7.5.2