1
linux/drivers/md
NeilBrown 133d4527ea md: flush writes before starting a recovery.
When we write to a degraded array which has a bitmap, we
make sure the relevant bit in the bitmap remains set when
the write completes (so a 're-add' can quickly rebuilt a
temporarily-missing device).

If, immediately after such a write starts, we incorporate a spare,
commence recovery, and skip over the region where the write is
happening (because the 'needs recovery' flag isn't set yet),
then that write will not get to the new device.

Once the recovery finishes the new device will be trusted, but will
have incorrect data, leading to possible corruption.

We cannot set the 'needs recovery' flag when we start the write as we
do not know easily if the write will be "degraded" or not.  That
depends on details of the particular raid level and particular write
request.

This patch fixes a corruption issue of long standing and so it
suitable for any -stable kernel.  It applied correctly to 3.0 at
least and will minor editing to earlier kernels.

Reported-by: Bill <billstuff2001@sbcglobal.net>
Tested-by: Bill <billstuff2001@sbcglobal.net>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/53A518BB.60709@sbcglobal.net
Signed-off-by: NeilBrown <neilb@suse.de>
2014-07-03 10:44:45 +10:00
..
bcache
persistent-data
bitmap.c md/bitmap: remove confusing code from filemap_get_page. 2014-05-29 16:59:47 +10:00
bitmap.h
dm-bio-prison.c dm bio prison: implement per bucket locking in the dm_bio_prison hash table 2014-06-11 16:48:54 -04:00
dm-bio-prison.h dm thin: return ENOSPC instead of EIO when error_if_no_space enabled 2014-06-03 13:44:08 -04:00
dm-bio-record.h
dm-bufio.c
dm-bufio.h
dm-builtin.c
dm-cache-block-types.h
dm-cache-metadata.c
dm-cache-metadata.h
dm-cache-policy-cleaner.c
dm-cache-policy-internal.h
dm-cache-policy-mq.c
dm-cache-policy.c
dm-cache-policy.h
dm-cache-target.c dm cache: always split discards on cache block boundaries 2014-05-27 10:33:05 -04:00
dm-crypt.c
dm-delay.c
dm-era-target.c dm era: check for a non-NULL metadata object before closing it 2014-06-03 13:44:08 -04:00
dm-exception-store.c
dm-exception-store.h
dm-flakey.c
dm-io.c
dm-ioctl.c
dm-kcopyd.c
dm-linear.c
dm-log-userspace-base.c
dm-log-userspace-transfer.c
dm-log-userspace-transfer.h
dm-log.c
dm-mpath.c dm: disable WRITE SAME if it fails 2014-06-04 09:45:52 -04:00
dm-mpath.h
dm-path-selector.c
dm-path-selector.h
dm-queue-length.c
dm-raid1.c
dm-raid.c
dm-region-hash.c
dm-round-robin.c
dm-service-time.c
dm-snap-persistent.c
dm-snap-transient.c
dm-snap.c . Add dm_accept_partial_bio interface to DM core to allow DM targets 2014-06-12 13:33:29 -07:00
dm-stats.c
dm-stats.h
dm-stripe.c
dm-switch.c
dm-sysfs.c
dm-table.c dm: remove symbol export for dm_set_device_limits 2014-06-04 09:46:34 -04:00
dm-target.c
dm-thin-metadata.c
dm-thin-metadata.h
dm-thin.c dm thin: update discard_granularity to reflect the thin-pool blocksize 2014-06-11 16:56:12 -04:00
dm-uevent.c
dm-uevent.h
dm-verity.c
dm-zero.c
dm.c . Add dm_accept_partial_bio interface to DM core to allow DM targets 2014-06-12 13:33:29 -07:00
dm.h
faulty.c
Kconfig
linear.c
linear.h
Makefile
md.c md: flush writes before starting a recovery. 2014-07-03 10:44:45 +10:00
md.h
multipath.c
multipath.h
raid0.c
raid0.h
raid1.c
raid1.h
raid5.c Assorted md fixes for 3.16 2014-06-11 08:33:41 -07:00
raid5.h raid5: add an option to avoid copy data from bio to stripe cache 2014-05-29 16:59:47 +10:00
raid10.c
raid10.h