]> git.baikalelectronics.ru Git - kernel.git/commit
md/raid1,5,10: Disable WRITE SAME until a recovery strategy is in place
authorH. Peter Anvin <hpa@zytor.com>
Wed, 12 Jun 2013 14:37:43 +0000 (07:37 -0700)
committerNeilBrown <neilb@suse.de>
Thu, 13 Jun 2013 04:49:54 +0000 (14:49 +1000)
commit412383e9c45c1a771b7c139823f0bd3632254a60
treed87edf6a82c43ec53d43aed19ef6710fac6a1b67
parentbce81198f9c0eda1d600496902b16043e9618d2f
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>
drivers/md/raid1.c
drivers/md/raid10.c
drivers/md/raid5.c