]> git.karo-electronics.de Git - karo-tx-linux.git/commit
md/raid1: delay reads that could overtake behind-writes.
authorNeilBrown <neilb@suse.de>
Wed, 31 Mar 2010 00:21:44 +0000 (11:21 +1100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 13 Aug 2010 20:20:25 +0000 (13:20 -0700)
commit8c2b26e45cca45298627428a0bc8bf8a6423d9d1
tree160dd35f77f9d4b14a3320de229b577befa9fc7a
parent0c5210f73e4a4d2d63e0f94b204bea531b56c529
md/raid1: delay reads that could overtake behind-writes.

commit e555190d82c0f58e825e3cbd9e6ebe2e7ac713bd upstream.

When a raid1 array is configured to support write-behind
on some devices, it normally only reads from other devices.
If all devices are write-behind (because the rest have failed)
it is possible for a read request to be serviced before a
behind-write request, which would appear as data corruption.

So when forced to read from a WriteMostly device, wait for any
write-behind to complete, and don't start any more behind-writes.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/md/bitmap.c
drivers/md/bitmap.h
drivers/md/raid1.c