NeilBrown: Fix restarting of reshaping arrays.

Martin F. Krafft madduck at alioth.debian.org
Sun Aug 29 11:55:15 UTC 2010


Module: mdadm
Branch: fixes/udev-blkid
Commit: 5f6ca90a9b81380317084ec0229e13ff2aa77fd0
URL:    http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=commit;h=5f6ca90a9b81380317084ec0229e13ff2aa77fd0

Author: NeilBrown <neilb at suse.de>
Date:   Thu Jul 29 13:50:15 2010 +1000

Fix restarting of reshaping arrays.

We cannot get stripe_cache_size until after the array have
been activated!!

Signed-off-by: NeilBrown <neilb at suse.de>

---

 Grow.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/Grow.c b/Grow.c
index e466a08..06343a0 100644
--- a/Grow.c
+++ b/Grow.c
@@ -1976,12 +1976,6 @@ int Grow_continue(int mdfd, struct supertype *st, struct mdinfo *info,
 	int cache;
 	int done = 0;
 
-	sra = sysfs_read(-1, devname2devnum(info->sys_name),
-			 GET_COMPONENT|GET_DEVS|GET_OFFSET|GET_STATE|
-			 GET_CACHE);
-	if (!sra)
-		return 1;
-
 	err = sysfs_set_str(info, NULL, "array_state", "readonly");
 	if (err)
 		return err;
@@ -1989,7 +1983,13 @@ int Grow_continue(int mdfd, struct supertype *st, struct mdinfo *info,
 	/* make sure reshape doesn't progress until we are ready */
 	sysfs_set_str(info, NULL, "sync_max", "0");
 	sysfs_set_str(info, NULL, "array_state", "active"); /* FIXME or clean */
-	
+
+	sra = sysfs_read(-1, devname2devnum(info->sys_name),
+			 GET_COMPONENT|GET_DEVS|GET_OFFSET|GET_STATE|
+			 GET_CACHE);
+	if (!sra)
+		return 1;
+
 	/* ndisks is not growing, so raid_disks is old and +delta is new */
 	odisks = info->array.raid_disks;
 	ndisks = odisks + info->delta_disks;




More information about the pkg-mdadm-commits mailing list