[PULL REQUEST] Several bug fixes for md in 3.7

From: NeilBrown
Date: Fri Nov 23 2012 - 14:40:11 EST



Coming a bit late to the -rc party, but here are some bug fixes found
recently through testing, regular usages, and code inspection.

Most worrying is a data corruption risk when 'replacing' devices in a RAID10.
Maybe most interesting is that generic DISCARD support requires granularity to
be a power of two, so RAID5 cannot make the granularity be one-stripe in
most cases. This probably makes DISCARD on raid5 less than useful.
Hopefully the generic code will get fixed.

NeilBrown


The following changes since commit ed30be077e705e0dff53bfc51d23feb8aeeab78f:

MD RAID10: Fix oops when creating RAID10 arrays via dm-raid.c (2012-10-31 11:42:30 +1100)

are available in the git repository at:

git://neil.brown.name/md/ tags/md-3.7-fixes

for you to fetch changes up to 884162df2aadd7414bef4935e1a54976fd4e3988:

md/raid10: decrement correct pending counter when writing to replacement. (2012-11-22 15:12:42 +1100)

----------------------------------------------------------------
Several bug fixes for md in 3.7

- raid5 discard has problems
- raid10 replacement devices have problems
- bad block lock seqlock usage has problems
- dm-raid doesn't free everything

----------------------------------------------------------------
NeilBrown (6):
md: make sure everything is freed when dm-raid stops an array.
md/raid5: round discard alignment up to power of 2.
md/raid5: move resolving of reconstruct_state earlier in stripe_handle.
md/raid5: Make sure we clear R5_Discard when discard is finished.
md/raid10: close race that lose writes lost when replacement completes.
md/raid10: decrement correct pending counter when writing to replacement.

majianpeng (2):
md: Reassigned the parameters if read_seqretry returned true in func md_is_badblock.
md: Avoid write invalid address if read_seqretry returned true.

drivers/md/md.c | 27 ++++++++---
drivers/md/raid10.c | 131 +++++++++++++++++++++++++++-------------------------
drivers/md/raid5.c | 79 ++++++++++++++++---------------
3 files changed, 132 insertions(+), 105 deletions(-)

Attachment: signature.asc
Description: PGP signature