md/raid1,raid10: Fix calculation of 'vcnt' when processing error recovery.
commit128b61db6e0319afffe5e3c87a36d27e71cd0d4d
authormajianpeng <majianpeng@gmail.com>
Thu, 12 Apr 2012 06:04:47 +0000 (12 16:04 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 22 Apr 2012 22:38:55 +0000 (22 15:38 -0700)
tree7188290f414ff54b0010fe401e700c908321c610
parent3bb3d575767c0e0978a079ce3765607b95ad2ce2
md/raid1,raid10: Fix calculation of 'vcnt' when processing error recovery.

commit f4380a915823dbed0bf8e3cf502ebcf2b7c7f833 upstream.

If r1bio->sectors % 8 != 0,then the memcmp and a later
memcpy will omit the last bio_vec.

This is suitable for any stable kernel since 3.1 when bad-block
management was introduced.

Signed-off-by: majianpeng <majianpeng@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/raid1.c
drivers/md/raid10.c