diff options
| -rw-r--r-- | drivers/md/raid10.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 62ebb1bc72be..7239079203ec 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c | |||
| @@ -538,7 +538,8 @@ static int read_balance(conf_t *conf, r10bio_t *r10_bio) | |||
| 538 | } | 538 | } |
| 539 | 539 | ||
| 540 | 540 | ||
| 541 | current_distance = abs(this_sector - conf->mirrors[disk].head_position); | 541 | current_distance = abs(r10_bio->devs[slot].addr - |
| 542 | conf->mirrors[disk].head_position); | ||
| 542 | 543 | ||
| 543 | /* Find the disk whose head is closest */ | 544 | /* Find the disk whose head is closest */ |
| 544 | 545 | ||
