summaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2012-05-19 01:01:13 +0200
committerNeilBrown <neilb@suse.de>2012-05-19 01:01:13 +0200
commitb0d634d5683f0b186b242ce6a4f3b041edb8b956 (patch)
tree6443dc130dcd45c78ca2878938464c418ea89c41 /drivers/md
parentMD: Add del_timer_sync to mddev_suspend (fix nasty panic) (diff)
downloadlinux-b0d634d5683f0b186b242ce6a4f3b041edb8b956.tar.xz
linux-b0d634d5683f0b186b242ce6a4f3b041edb8b956.zip
md/raid10: fix transcription error in calc_sectors conversion.
The old code was sector_div(stride, fc); the new code was sector_dir(size, conf->near_copies); 'size' is right (the stride various wasn't really needed), but 'fc' means 'far_copies', and that is an important difference. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to '')
-rw-r--r--drivers/md/raid10.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index 3e7b1548111a..3f91c2e1dfe7 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -3189,7 +3189,7 @@ static void calc_sectors(struct r10conf *conf, sector_t size)
if (conf->far_offset)
conf->stride = 1 << conf->chunk_shift;
else {
- sector_div(size, conf->near_copies);
+ sector_div(size, conf->far_copies);
conf->stride = size << conf->chunk_shift;
}
}