NeilBrown b875e531fc [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>
2006-12-10 09:57:21 -08:00
..
2006-12-08 08:28:40 -08:00
2006-12-08 08:28:47 -08:00
2006-11-22 14:57:56 +00:00
2006-12-10 09:55:40 -08:00
2006-12-07 08:39:24 -08:00
2006-10-11 11:14:25 -07:00
2006-12-08 10:43:20 -08:00
2006-12-07 08:39:36 -08:00
2006-12-08 08:28:50 -08:00
2006-12-07 08:39:33 -08:00
2006-12-07 08:39:24 -08:00
2006-11-30 05:24:39 +01:00
2006-12-08 08:28:46 -08:00
2006-10-03 22:31:37 +02:00
2006-12-10 09:55:40 -08:00
2006-12-08 08:28:49 -08:00
2006-10-17 08:18:42 -07:00
2006-12-08 08:28:57 -08:00
2006-12-08 10:43:20 -08:00
2006-12-08 08:28:50 -08:00
2006-12-08 10:43:20 -08:00
2006-12-08 10:43:20 -08:00