android_kernel_google_msm/drivers/md
NeilBrown 18c8053c6b md/raid5: fix long-standing problem with bitmap handling on write failure.
commit 9f97e4b128 upstream.

Before a write starts we set a bit in the write-intent bitmap.
When the write completes we clear that bit if the write was successful
to all devices.  However if the write wasn't fully successful we
should not clear the bit.  If the faulty drive is subsequently
re-added, the fact that the bit is still set ensure that we will
re-write the data that is missing.

This logic is mediated by the STRIPE_DEGRADED flag - we only clear the
bitmap bit when this flag is not set.
Currently we correctly set the flag if a write starts when some
devices are failed or missing.  But we do *not* set the flag if some
device failed during the write attempt.
This is wrong and can result in clearing the bit inappropriately.

So: set the flag when a write fails.

This bug has been present since bitmaps were introduces, so the fix is
suitable for any -stable kernel.

Reported-by: Ethan Wilson <ethan.wilson@shiftmail.org>
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-06 11:05:46 -08:00
..
persistent-data dm persistent data: rename node to btree_node 2013-01-17 08:50:51 -08:00
bitmap.c md/bitmap: fix calculation of 'chunks' - missing shift. 2012-05-04 17:03:18 +10:00
bitmap.h md/bitmap: fix calculation of 'chunks' - missing shift. 2012-05-04 17:03:18 +10:00
dm-bio-record.h
dm-bufio.c dm bufio: initialize read-only module parameters 2013-12-20 07:34:20 -08:00
dm-bufio.h dm bufio: prefetch 2012-03-28 18:41:29 +01:00
dm-crypt.c dm: fix truncated status strings 2013-12-08 07:29:43 -08:00
dm-delay.c dm delay: fix a possible deadlock due to shared workqueue 2013-12-20 07:34:20 -08:00
dm-exception-store.c
dm-exception-store.h
dm-flakey.c dm: fix truncated status strings 2013-12-08 07:29:43 -08:00
dm-io.c
dm-ioctl.c dm: fix truncated status strings 2013-12-08 07:29:43 -08:00
dm-kcopyd.c
dm-linear.c dm: fix truncated status strings 2013-12-08 07:29:43 -08:00
dm-log-userspace-base.c
dm-log-userspace-transfer.c connector/userns: replace netlink uses of cap_raised() with capable() 2012-05-10 23:21:39 -04:00
dm-log-userspace-transfer.h
dm-log.c dm: reject trailing characters in sccanf input 2012-03-28 18:41:26 +01:00
dm-mpath.c dm: fix truncated status strings 2013-12-08 07:29:43 -08:00
dm-mpath.h
dm-path-selector.c
dm-path-selector.h
dm-queue-length.c dm: reject trailing characters in sccanf input 2012-03-28 18:41:26 +01:00
dm-raid.c dm: fix truncated status strings 2013-12-08 07:29:43 -08:00
dm-raid1.c dm: fix truncated status strings 2013-12-08 07:29:43 -08:00
dm-region-hash.c dm raid1: fix crash with mirror recovery and discard 2012-07-29 08:04:21 -07:00
dm-round-robin.c dm: reject trailing characters in sccanf input 2012-03-28 18:41:26 +01:00
dm-service-time.c dm: reject trailing characters in sccanf input 2012-03-28 18:41:26 +01:00
dm-snap-persistent.c dm snapshot: fix data corruption 2013-11-04 04:23:42 -08:00
dm-snap-transient.c
dm-snap.c dm: fix truncated status strings 2013-12-08 07:29:43 -08:00
dm-stripe.c dm: fix truncated status strings 2013-12-08 07:29:43 -08:00
dm-sysfs.c Driver core: Constify struct sysfs_ops in struct kobj_type 2010-03-07 17:04:49 -08:00
dm-table.c dm table: fail dm_table_create on dm_round_up overflow 2013-12-20 07:34:20 -08:00
dm-target.c
dm-thin-metadata.c dm thin: relax hard limit on the maximum size of a metadata device 2012-03-28 18:41:28 +01:00
dm-thin-metadata.h dm thin: relax hard limit on the maximum size of a metadata device 2012-03-28 18:41:28 +01:00
dm-thin.c dm: fix truncated status strings 2013-12-08 07:29:43 -08:00
dm-uevent.c
dm-uevent.h
dm-verity.c dm: fix truncated status strings 2013-12-08 07:29:43 -08:00
dm-zero.c
dm.c dm: fix deadlock with request based dm and queue request_fn recursion 2012-12-03 11:47:07 -08:00
dm.h
faulty.c
Kconfig dm: add verity target 2012-03-28 18:43:38 +01:00
linear.c md/linear: If md_integrity_register() fails, linear_run() must free the mem. 2012-04-02 09:48:37 +10:00
linear.h
Makefile dm: add verity target 2012-03-28 18:43:38 +01:00
md.c md: fix calculation of stacking limits on level change. 2013-12-04 10:50:33 -08:00
md.h
multipath.c
multipath.h
raid0.c md: raid0: fix error return from create_stripe_zones. 2013-03-14 11:29:49 -07:00
raid0.h
raid1.c md: Fix skipping recovery for read-only arrays. 2013-11-13 12:01:48 +09:00
raid1.h
raid5.c md/raid5: fix long-standing problem with bitmap handling on write failure. 2014-02-06 11:05:46 -08:00
raid5.h md/raid5: fix interaction of 'replace' and 'recovery'. 2013-08-04 16:26:00 +08:00
raid10.c md/raid10: fix two bugs in handling of known-bad-blocks. 2014-01-29 05:10:42 -08:00
raid10.h md/raid10: fix problem with on-stack allocation of r10bio structure. 2012-10-02 10:30:33 -07:00