summaryrefslogtreecommitdiff
path: root/Grow.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2013-05-21 16:35:29 +1000
committerNeilBrown <neilb@suse.de>2013-05-22 12:26:35 +1000
commit9ad2a640fe8579659455ef51b1fa40ea532e865f (patch)
tree2d3761628e63558deee455a6a319d00d39d590bd /Grow.c
parent4abcbc21b90f614ec8eeb2da6eafffcb8ed10be7 (diff)
Grow: handle E2BIG from new_offset changes more gracefully.
If new_offset change is too big, just do the reshape the old way. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Grow.c')
-rw-r--r--Grow.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/Grow.c b/Grow.c
index 32776491..5d35e320 100644
--- a/Grow.c
+++ b/Grow.c
@@ -2288,8 +2288,11 @@ static int set_new_data_offset(struct mdinfo *sra, struct supertype *st,
if (sysfs_set_num(sra, sd, "new_offset",
info2.new_data_offset) < 0) {
err = errno;
- if (sd == sra->devs && err == ENOENT)
- /* Early kernel, no 'new_offset' file.
+ err = -1;
+ if (sd == sra->devs &&
+ (errno == ENOENT || errno == E2BIG))
+ /* Early kernel, no 'new_offset' file,
+ * or kernel doesn't like us.
* For RAID5/6 this is not fatal
*/
return 1;