md: raid1/raid10: fix problem with merge_bvec_fn
authorNeilBrown <neilb@suse.de>
Thu, 31 May 2012 05:39:11 +0000 (15:39 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 9 Jun 2012 15:36:18 +0000 (00:36 +0900)
commit584b886aee3aff5fe7eb21e30f779eb5cd1daa36
tree61945a4b446196fd4e21cb0c5fe9d125d26fd1ea
parentcf9ab4c62be7837c2f007cd51ab3604ca0620070
md: raid1/raid10: fix problem with merge_bvec_fn

commit aba336bd1d46d6b0404b06f6915ed76150739057 upstream.

The new merge_bvec_fn which calls the corresponding function
in subsidiary devices requires that mddev->merge_check_needed
be set if any child has a merge_bvec_fn.

However were were only setting that when a device was hot-added,
not when a device was present from the start.

This bug was introduced in 3.4 so patch is suitable for 3.4.y
kernels.  However that are conflicts in raid10.c so a separate
patch will be needed for 3.4.y.

Reported-by: Sebastian Riemer <sebastian.riemer@profitbricks.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