[kernel] r17404 - in dists/lenny/linux-2.6/debian: . patches/bugfix/all patches/series

Dann Frazier dannf at alioth.debian.org
Mon May 16 00:57:07 UTC 2011


Author: dannf
Date: Mon May 16 00:57:05 2011
New Revision: 17404

Log:
dm raid1: fail writes if errors are not handled and log fails

Added:
   dists/lenny/linux-2.6/debian/patches/bugfix/all/dm-raid1-fail-writes-if-errors-are-not-handled-and-log-fails.patch
Modified:
   dists/lenny/linux-2.6/debian/changelog
   dists/lenny/linux-2.6/debian/patches/series/27

Modified: dists/lenny/linux-2.6/debian/changelog
==============================================================================
--- dists/lenny/linux-2.6/debian/changelog	Mon May 16 00:56:55 2011	(r17403)
+++ dists/lenny/linux-2.6/debian/changelog	Mon May 16 00:57:05 2011	(r17404)
@@ -14,6 +14,7 @@
     - ptrace: use safer wake up on ptrace_detach()
     - [x86] mm: avoid possible bogus tlb entries by clearing prev mm_cpumask
       after switching mm
+    - dm raid1: fail writes if errors are not handled and log fails
 
  -- Ben Hutchings <ben at decadent.org.uk>  Mon, 29 Nov 2010 02:01:24 +0000
 

Added: dists/lenny/linux-2.6/debian/patches/bugfix/all/dm-raid1-fail-writes-if-errors-are-not-handled-and-log-fails.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/lenny/linux-2.6/debian/patches/bugfix/all/dm-raid1-fail-writes-if-errors-are-not-handled-and-log-fails.patch	Mon May 16 00:57:05 2011	(r17404)
@@ -0,0 +1,45 @@
+commit 7404ccad11827e62290b0b4dc2dfe0b6ba70f8ad
+Author: Mikulas Patocka <mpatocka at redhat.com>
+Date:   Tue Feb 16 18:42:55 2010 +0000
+
+    dm raid1: fail writes if errors are not handled and log fails
+    
+    commit 5528d17de1cf1462f285c40ccaf8e0d0e4c64dc0 upstream.
+    
+    If the mirror log fails when the handle_errors option was not selected
+    and there is no remaining valid mirror leg, writes return success even
+    though they weren't actually written to any device.  This patch
+    completes them with EIO instead.
+    
+    This code path is taken:
+    do_writes:
+    	bio_list_merge(&ms->failures, &sync);
+    do_failures:
+    	if (!get_valid_mirror(ms)) (false)
+    	else if (errors_handled(ms)) (false)
+    	else bio_endio(bio, 0);
+    
+    The logic in do_failures is based on presuming that the write was already
+    tried: if it succeeded at least on one leg (without handle_errors) it
+    is reported as success.
+    
+    Reference: https://bugzilla.redhat.com/show_bug.cgi?id=555197
+    
+    Signed-off-by: Mikulas Patocka <mpatocka at redhat.com>
+    Signed-off-by: Alasdair G Kergon <agk at redhat.com>
+    Cc: maximilian attems <max at stro.at>
+    Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
+
+diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c
+index 8fe418b..3520607 100644
+--- a/drivers/md/dm-raid1.c
++++ b/drivers/md/dm-raid1.c
+@@ -1198,7 +1198,7 @@ static void do_writes(struct mirror_set *ms, struct bio_list *writes)
+ 	/*
+ 	 * Dispatch io.
+ 	 */
+-	if (unlikely(ms->log_failure)) {
++	if (unlikely(ms->log_failure) && errors_handled(ms)) {
+ 		spin_lock_irq(&ms->lock);
+ 		bio_list_merge(&ms->failures, &sync);
+ 		spin_unlock_irq(&ms->lock);

Modified: dists/lenny/linux-2.6/debian/patches/series/27
==============================================================================
--- dists/lenny/linux-2.6/debian/patches/series/27	Mon May 16 00:56:55 2011	(r17403)
+++ dists/lenny/linux-2.6/debian/patches/series/27	Mon May 16 00:57:05 2011	(r17404)
@@ -5,3 +5,4 @@
 + bugfix/all/nfs-fix-the-return-value-of-nfs_file_fsync.patch
 + bugfix/all/ptrace-use-safer-wake-up-on-ptrace_detach.patch
 + bugfix/x86/mm-avoid-possible-bogus-tlb-entries-by-clearing-prev-mm_cpumask-after.patch
++ bugfix/all/dm-raid1-fail-writes-if-errors-are-not-handled-and-log-fails.patch



More information about the Kernel-svn-changes mailing list