kernel-hacking-2024-linux-s.../drivers/md
H. Peter Anvin 5026d7a9b2 md/raid1,5,10: Disable WRITE SAME until a recovery strategy is in place
There are cases where the kernel will believe that the WRITE SAME
command is supported by a block device which does not, in fact,
support WRITE SAME.  This currently happens for SATA drivers behind a
SAS controller, but there are probably a hundred other ways that can
happen, including drive firmware bugs.

After receiving an error for WRITE SAME the block layer will retry the
request as a plain write of zeroes, but mdraid will consider the
failure as fatal and consider the drive failed.  This has the effect
that all the mirrors containing a specific set of data are each
offlined in very rapid succession resulting in data loss.

However, just bouncing the request back up to the block layer isn't
ideal either, because the whole initial request-retry sequence should
be inside the write bitmap fence, which probably means that md needs
to do its own conversion of WRITE SAME to write zero.

Until the failure scenario has been sorted out, disable WRITE SAME for
raid1, raid5, and raid10.

[neilb: added raid5]

This patch is appropriate for any -stable since 3.7 when write_same
support was added.

Cc: stable@vger.kernel.org
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
2013-06-13 14:49:54 +10:00
..
persistent-data dm thin: fix discard corruption 2013-03-20 17:21:24 +00:00
bitmap.c md: use set_bit_le and clear_bit_le 2013-04-24 11:42:41 +10:00
bitmap.h
dm-bio-prison.c dm: add cache target 2013-03-01 22:45:51 +00:00
dm-bio-prison.h dm: add cache target 2013-03-01 22:45:51 +00:00
dm-bio-record.h
dm-bufio.c dm verity: avoid deadlock 2013-03-20 17:21:25 +00:00
dm-bufio.h
dm-cache-block-types.h dm: add cache target 2013-03-01 22:45:51 +00:00
dm-cache-metadata.c dm cache: policy ignore hints if generated by different version 2013-03-20 17:21:28 +00:00
dm-cache-metadata.h dm cache: policy ignore hints if generated by different version 2013-03-20 17:21:28 +00:00
dm-cache-policy-cleaner.c dm cache: policy change version from string to integer set 2013-03-20 17:21:27 +00:00
dm-cache-policy-internal.h dm cache: policy change version from string to integer set 2013-03-20 17:21:27 +00:00
dm-cache-policy-mq.c dm cache: policy change version from string to integer set 2013-03-20 17:21:27 +00:00
dm-cache-policy.c dm cache: policy change version from string to integer set 2013-03-20 17:21:27 +00:00
dm-cache-policy.h dm cache: policy change version from string to integer set 2013-03-20 17:21:27 +00:00
dm-cache-target.c dm cache: reduce bio front_pad size in writeback mode 2013-04-05 15:36:34 +01:00
dm-crypt.c dm: rename request variables to bios 2013-03-01 22:45:47 +00:00
dm-delay.c dm: rename request variables to bios 2013-03-01 22:45:47 +00:00
dm-exception-store.c
dm-exception-store.h
dm-flakey.c dm: rename request variables to bios 2013-03-01 22:45:47 +00:00
dm-io.c
dm-ioctl.c dm ioctl: allow message to return data 2013-03-01 22:45:49 +00:00
dm-kcopyd.c dm kcopyd: introduce configurable throttling 2013-03-01 22:45:49 +00:00
dm-linear.c dm: rename request variables to bios 2013-03-01 22:45:47 +00:00
dm-log-userspace-base.c
dm-log-userspace-transfer.c
dm-log-userspace-transfer.h
dm-log.c
dm-mpath.c dm: rename request variables to bios 2013-03-01 22:45:47 +00:00
dm-mpath.h
dm-path-selector.c
dm-path-selector.h
dm-queue-length.c
dm-raid.c DM RAID: Add message/status support for changing sync action 2013-04-24 11:42:43 +10:00
dm-raid1.c dm kcopyd: introduce configurable throttling 2013-03-01 22:45:49 +00:00
dm-region-hash.c
dm-round-robin.c
dm-service-time.c
dm-snap-persistent.c
dm-snap-transient.c
dm-snap.c dm kcopyd: introduce configurable throttling 2013-03-01 22:45:49 +00:00
dm-stripe.c dm: rename request variables to bios 2013-03-01 22:45:47 +00:00
dm-sysfs.c
dm-table.c dm: rename request variables to bios 2013-03-01 22:45:47 +00:00
dm-target.c dm: rename request variables to bios 2013-03-01 22:45:47 +00:00
dm-thin-metadata.c dm persistent data: set some btree fn parms const 2013-03-01 22:45:47 +00:00
dm-thin-metadata.h
dm-thin.c dm thin: fix non power of two discard granularity calc 2013-03-20 17:21:25 +00:00
dm-uevent.c
dm-uevent.h
dm-verity.c dm verity: avoid deadlock 2013-03-20 17:21:25 +00:00
dm-zero.c dm: rename request variables to bios 2013-03-01 22:45:47 +00:00
dm.c Revert "block: add missing block_bio_complete() tracepoint" 2013-04-18 09:00:26 -07:00
dm.h
faulty.c
Kconfig md updates for 3.9 2013-03-05 17:22:08 -08:00
linear.c
linear.h
Makefile dm cache: add cleaner policy 2013-03-01 22:45:52 +00:00
md.c md: md_stop_writes() should always freeze recovery. 2013-06-13 13:18:15 +10:00
md.h MD: Export 'md_reap_sync_thread' function 2013-04-24 11:42:43 +10:00
multipath.c
multipath.h
raid0.c md/raid0: improve error message when converting RAID4-with-spares to RAID0 2013-02-26 11:58:44 +11:00
raid0.h
raid1.c md/raid1,5,10: Disable WRITE SAME until a recovery strategy is in place 2013-06-13 14:49:54 +10:00
raid1.h
raid5.c md/raid1,5,10: Disable WRITE SAME until a recovery strategy is in place 2013-06-13 14:49:54 +10:00
raid5.h md: remove CONFIG_MULTICORE_RAID456 entirely 2013-03-20 13:21:14 +11:00
raid10.c md/raid1,5,10: Disable WRITE SAME until a recovery strategy is in place 2013-06-13 14:49:54 +10:00
raid10.h MD RAID10: Improve redundancy for 'far' and 'offset' algorithms (part 1) 2013-02-26 11:55:30 +11:00