[kernel] r15642 - in dists/sid/linux-2.6/debian: . patches/bugfix/all patches/series
Maximilian Attems
maks at alioth.debian.org
Sat May 8 17:25:39 UTC 2010
Author: maks
Date: Sat May 8 17:25:37 2010
New Revision: 15642
Log:
[SCSI] Retry commands with UNIT_ATTENTION sense codes to fix ext3/ext4 I/O erorrs
add followup patch from linux-next heading stable.
Added:
dists/sid/linux-2.6/debian/patches/bugfix/all/SCSI-Retry-commands-with-UNIT_ATTENTION-sense-codes-.patch
Modified:
dists/sid/linux-2.6/debian/changelog
dists/sid/linux-2.6/debian/patches/series/13
Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog Sat May 8 17:18:16 2010 (r15641)
+++ dists/sid/linux-2.6/debian/changelog Sat May 8 17:25:37 2010 (r15642)
@@ -13,6 +13,8 @@
CVE-2010-1437
* [SCSI] Enable retries for SYNCRONIZE_CACHE commands to fix I/O error.
* raid6: fix recovery performance regression.
+ * [SCSI] Retry commands with UNIT_ATTENTION sense codes to fix ext3/ext4
+ I/O errors.
-- Frederik Schüler <fs at debian.org> Wed, 05 May 2010 17:54:01 +0200
Added: dists/sid/linux-2.6/debian/patches/bugfix/all/SCSI-Retry-commands-with-UNIT_ATTENTION-sense-codes-.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/bugfix/all/SCSI-Retry-commands-with-UNIT_ATTENTION-sense-codes-.patch Sat May 8 17:25:37 2010 (r15642)
@@ -0,0 +1,56 @@
+From 77a4229719e511a0d38d9c355317ae1469adeb54 Mon Sep 17 00:00:00 2001
+From: James Bottomley <James.Bottomley at suse.de>
+Date: Tue, 4 May 2010 16:51:40 -0400
+Subject: [PATCH] [SCSI] Retry commands with UNIT_ATTENTION sense codes to fix ext3/ext4 I/O error
+
+There's nastyness in the way we currently handle barriers (and
+discards): They're effectively filesystem commands, but they get
+processed as BLOCK_PC commands. Unfortunately BLOCK_PC commands are
+taken by SCSI to be SG_IO commands and the issuer expects to see and
+handle any returned errors, however trivial. This leads to a huge
+problem, because the block layer doesn't expect this to happen and any
+trivially retryable error on a barrier causes an immediate I/O error
+to the filesystem.
+
+The only real way to hack around this is to take the usual class of
+offending errors (unit attentions) and make them all retryable in the
+case of a REQ_HARDBARRIER. A correct fix would involve a rework of
+the entire block and SCSI submit system, and so is out of scope for a
+quick fix.
+
+Cc: Hannes Reinecke <hare at suse.de>
+Cc: Stable Tree <stable at kernel.org>
+Signed-off-by: James Bottomley <James.Bottomley at suse.de>
+---
+ drivers/scsi/scsi_error.c | 15 ++++++++++++++-
+ 1 files changed, 14 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
+index d45c69c..7ad53fa 100644
+--- a/drivers/scsi/scsi_error.c
++++ b/drivers/scsi/scsi_error.c
+@@ -302,7 +302,20 @@ static int scsi_check_sense(struct scsi_cmnd *scmd)
+ if (scmd->device->allow_restart &&
+ (sshdr.asc == 0x04) && (sshdr.ascq == 0x02))
+ return FAILED;
+- return SUCCESS;
++
++ if (blk_barrier_rq(scmd->request))
++ /*
++ * barrier requests should always retry on UA
++ * otherwise block will get a spurious error
++ */
++ return NEEDS_RETRY;
++ else
++ /*
++ * for normal (non barrier) commands, pass the
++ * UA upwards for a determination in the
++ * completion functions
++ */
++ return SUCCESS;
+
+ /* these three are not supported */
+ case COPY_ABORTED:
+--
+1.6.5
+
Modified: dists/sid/linux-2.6/debian/patches/series/13
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/13 Sat May 8 17:18:16 2010 (r15641)
+++ dists/sid/linux-2.6/debian/patches/series/13 Sat May 8 17:25:37 2010 (r15642)
@@ -3,3 +3,4 @@
+ bugfix/all/keys-the-request_key-syscall-should-link-an-existing-key-to-the-dest-keyring.patch
+ bugfix/all/SCSI-Enable-retries-for-SYNCRONIZE_CACHE-commands-to.patch
+ bugfix/all/raid6-fix-recovery-performance-regression.patch
++ bugfix/all/SCSI-Retry-commands-with-UNIT_ATTENTION-sense-codes-.patch
More information about the Kernel-svn-changes
mailing list