summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2007-08-20 14:14:42 +1000
committerNeil Brown <neilb@suse.de>2007-08-20 14:14:42 +1000
commit2295250a7387d28975061a936b60d0d22f8e4c0e (patch)
treee303fe4ec82cba873f6217677e3d7575fb0e0b74
parenteb6dae98500dd087548b593c9b7e3db7b3cff9b2 (diff)
downloadmdadm-2295250a7387d28975061a936b60d0d22f8e4c0e.tar.gz
mdadm-2295250a7387d28975061a936b60d0d22f8e4c0e.tar.xz
mdadm-2295250a7387d28975061a936b60d0d22f8e4c0e.zip
Report error when grow cannot be restarted.
Make sure that if --assemble find an array in the critical region of a reshape, and cannot find the critical data to restart the reshape, it gives an error message.
-rw-r--r--ChangeLog3
-rw-r--r--Grow.c5
2 files changed, 5 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 6a525f0..4ae4dad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,9 @@ Changes Prior to this release
1.x array was created with older mdadm).
- When adding a drive that was a little too small, we did not get
the correct error message.
+ - Make sure that if --assemble find an array in the critical region
+ of a reshape, and cannot find the critical data to restart the
+ reshape, it gives an error message.
Changes Prior to 2.6.2 release
- --fail detached and --remove faulty can be used to fail and
diff --git a/Grow.c b/Grow.c
index 52907fa..825747e 100644
--- a/Grow.c
+++ b/Grow.c
@@ -867,7 +867,6 @@ int Grow_restart(struct supertype *st, struct mdinfo *info, int *fdlist, int cnt
{
int i, j;
int old_disks;
- int err = 0;
unsigned long long *offsets;
if (info->delta_disks < 0)
@@ -960,7 +959,7 @@ int Grow_restart(struct supertype *st, struct mdinfo *info, int *fdlist, int cnt
fd, __le64_to_cpu(bsb.devstart)*512,
0, __le64_to_cpu(bsb.length)*512)) {
/* didn't succeed, so giveup */
- return -1;
+ return 1;
}
/* Ok, so the data is restored. Let's update those superblocks. */
@@ -979,5 +978,5 @@ int Grow_restart(struct supertype *st, struct mdinfo *info, int *fdlist, int cnt
/* And we are done! */
return 0;
}
- return err;
+ return 1;
}