Permalink
Browse files

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>
  • Loading branch information...
1 parent 0d9f4f1 commit b0d634d5683f0b186b242ce6a4f3b041edb8b956 @neilbrown neilbrown committed May 18, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 drivers/md/raid10.c
View
@@ -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;
}
}

0 comments on commit b0d634d

Please sign in to comment.