diff options
author | NeilBrown <neilb@suse.de> | 2006-12-10 02:20:49 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-10 09:57:21 -0800 |
commit | b875e531fc82db592d6093594593d5cafde0a1cd (patch) | |
tree | 4bf23fcee1a1d1675339ea7e5d671dde6dd8641f /drivers/char/ppdev.c | |
parent | 5248861511d6aae4997a5aa7152824d87587b0b6 (diff) |
[PATCH] md: fix innocuous bug in raid6 stripe_to_pdidx
stripe_to_pdidx finds the index of the parity disk for a given stripe. It
assumes raid5 in that it uses "disks-1" to determine the number of data disks.
This is incorrect for raid6 but fortunately the two usages cancel each other
out. The only way that 'data_disks' affects the calculation of pd_idx in
raid5_compute_sector is when it is divided into the sector number. But as
that sector number is calculated by multiplying in the wrong value of
'data_disks' the division produces the right value.
So it is innocuous but needs to be fixed.
Also change the calculation of raid_disks in compute_blocknr to make it
more obviously correct (it seems at first to always use disks-1 too).
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/ppdev.c')
0 files changed, 0 insertions, 0 deletions