NeilBrown: Grow: ignore error from final wait_backup
Martin F. Krafft
madduck at alioth.debian.org
Wed Jan 27 02:00:52 UTC 2010
Module: mdadm
Branch: build
Commit: 725cac4c569c645415fd78f08fe39a8afdffec1e
URL: http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=commit;h=725cac4c569c645415fd78f08fe39a8afdffec1e
Author: NeilBrown <neilb at suse.de>
Date: Mon Oct 12 16:55:19 2009 +1100
Grow: ignore error from final wait_backup
The last time wait_backup is called, it might see reshape
finish and so return an error indicator.
But this is not an error, and we must go ahead and prepare
the array for full access.
Signed-off-by: NeilBrown <neilb at suse.de>
---
Grow.c | 20 ++++++++------------
1 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/Grow.c b/Grow.c
index e3239d6..c0fa566 100644
--- a/Grow.c
+++ b/Grow.c
@@ -1417,10 +1417,9 @@ static int child_grow(int afd, struct mdinfo *sra, unsigned long stripes,
dests, destfd, destoffsets,
0, buf);
validate(afd, destfd[0], destoffsets[0]);
- if (wait_backup(sra, 0, stripes * chunk / 512, stripes * chunk / 512,
- dests, destfd, destoffsets,
- 0) < 0)
- return 0;
+ wait_backup(sra, 0, stripes * chunk / 512, stripes * chunk / 512,
+ dests, destfd, destoffsets,
+ 0);
sysfs_set_num(sra, NULL, "suspend_lo", (stripes * chunk/512) * data);
free(buf);
/* FIXME this should probably be numeric */
@@ -1453,10 +1452,8 @@ static int child_shrink(int afd, struct mdinfo *sra, unsigned long stripes,
dests, destfd, destoffsets,
0, buf);
validate(afd, destfd[0], destoffsets[0]);
- rv = wait_backup(sra, start, stripes*chunk/512, 0,
- dests, destfd, destoffsets, 0);
- if (rv < 0)
- return 0;
+ wait_backup(sra, start, stripes*chunk/512, 0,
+ dests, destfd, destoffsets, 0);
sysfs_set_num(sra, NULL, "suspend_lo", (stripes * chunk/512) * data);
free(buf);
/* FIXME this should probably be numeric */
@@ -1523,10 +1520,9 @@ static int child_same_size(int afd, struct mdinfo *sra, unsigned long stripes,
part) < 0)
return 0;
sysfs_set_num(sra, NULL, "suspend_lo", ((start-stripes)*chunk/512) * data);
- if (wait_backup(sra, (start-stripes) * chunk/512, tailstripes * chunk/512, 0,
- dests, destfd, destoffsets,
- 1-part) < 0)
- return 0;
+ wait_backup(sra, (start-stripes) * chunk/512, tailstripes * chunk/512, 0,
+ dests, destfd, destoffsets,
+ 1-part);
sysfs_set_num(sra, NULL, "suspend_lo", (size*chunk/512) * data);
sysfs_set_num(sra, NULL, "sync_speed_min", speed);
free(buf);
More information about the pkg-mdadm-commits
mailing list