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

Dann Frazier dannf at alioth.debian.org
Mon May 16 00:58:47 UTC 2011


Author: dannf
Date: Mon May 16 00:58:46 2011
New Revision: 17418

Log:
md: fix regression with re-adding devices to arrays with no metadata

Added:
   dists/lenny/linux-2.6/debian/patches/bugfix/all/md-fix-bug-with-re-adding-of-partially-recovered-device-regression.patch
Modified:
   dists/lenny/linux-2.6/debian/changelog

Modified: dists/lenny/linux-2.6/debian/changelog
==============================================================================
--- dists/lenny/linux-2.6/debian/changelog	Mon May 16 00:58:37 2011	(r17417)
+++ dists/lenny/linux-2.6/debian/changelog	Mon May 16 00:58:46 2011	(r17418)
@@ -27,6 +27,7 @@
     - ocfs2_connection_find() returns pointer to bad structure
     - libsas: fix runaway error handler problem
     - NFS: Fix "kernel BUG at fs/aio.c:554!"
+    - md: fix regression with re-adding devices to arrays with no metadata
 
  -- 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/md-fix-bug-with-re-adding-of-partially-recovered-device-regression.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/lenny/linux-2.6/debian/patches/bugfix/all/md-fix-bug-with-re-adding-of-partially-recovered-device-regression.patch	Mon May 16 00:58:46 2011	(r17418)
@@ -0,0 +1,43 @@
+commit 2d43dcfb1bf7486f3208e8bb37e37fd41588353b
+Author: NeilBrown <neilb at suse.de>
+Date:   Wed Jan 12 09:03:35 2011 +1100
+
+    md: fix regression with re-adding devices to arrays with no metadata
+    
+    commit bf572541ab44240163eaa2d486b06f306a31d45a upstream.
+    
+    Commit 1a855a0606 (2.6.37-rc4) fixed a problem where devices were
+    re-added when they shouldn't be but caused a regression in a less
+    common case that means sometimes devices cannot be re-added when they
+    should be.
+    
+    In particular, when re-adding a device to an array without metadata
+    we should always access the device, but after the above commit we
+    didn't.
+    
+    This patch sets the In_sync flag in that case so that the re-add
+    succeeds.
+    
+    This patch is suitable for any -stable kernel to which 1a855a0606 was
+    applied.
+    
+    Signed-off-by: NeilBrown <neilb at suse.de>
+    Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
+    [dannf: adjusted to Debian's 2.6.26]
+
+diff -urpN linux-source-2.6.26.orig/drivers/md/md.c linux-source-2.6.26/drivers/md/md.c
+--- linux-source-2.6.26.orig/drivers/md/md.c	2011-05-15 17:41:11.319677736 -0600
++++ linux-source-2.6.26/drivers/md/md.c	2011-05-15 17:42:40.684415518 -0600
+@@ -4146,9 +4146,10 @@ static int add_new_disk(mddev_t * mddev,
+ 		/* set saved_raid_disk if appropriate */
+ 		if (!mddev->persistent) {
+ 			if (info->state & (1<<MD_DISK_SYNC)  &&
+-			    info->raid_disk < mddev->raid_disks)
++			    info->raid_disk < mddev->raid_disks) {
+ 				rdev->raid_disk = info->raid_disk;
+-			else
++				set_bit(In_sync, &rdev->flags);
++			} else
+ 				rdev->raid_disk = -1;
+ 		} else
+ 			super_types[mddev->major_version].



More information about the Kernel-svn-changes mailing list