md/raid10: fix transcription error in calc_sectors conversion.
authorNeilBrown <neilb@suse.de>
Fri, 18 May 2012 23:01:13 +0000 (09:01 +1000)
committerNeilBrown <neilb@suse.de>
Fri, 18 May 2012 23:01:13 +0000 (09:01 +1000)
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>
drivers/md/raid10.c

index 3e7b1548111a95d58b690fd68090d3b34751e8b5..3f91c2e1dfe765e79b916e18b74f22f23da14e04 100644 (file)
@@ -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;
        }
 }