summaryrefslogtreecommitdiffstats
path: root/Grow.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2013-05-21 08:50:05 +0200
committerNeilBrown <neilb@suse.de>2013-05-22 04:27:35 +0200
commitd7e1f52bb83735932264ddce671c47b8acfc78c3 (patch)
treec456f79feb12fe6347f35880244778ca51df3fe6 /Grow.c
parentGrow: --backup-file and --data-offset are incompatible. (diff)
downloadmdadm-d7e1f52bb83735932264ddce671c47b8acfc78c3.tar.xz
mdadm-d7e1f52bb83735932264ddce671c47b8acfc78c3.zip
Grow: E2BIG should be reporte differently if --data-offset was requested.
In that case the problem is almost certainly that --data-offset is too big. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Grow.c')
-rw-r--r--Grow.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Grow.c b/Grow.c
index 8794f4ec..82f3cc17 100644
--- a/Grow.c
+++ b/Grow.c
@@ -2289,6 +2289,11 @@ static int set_new_data_offset(struct mdinfo *sra, struct supertype *st,
info2.new_data_offset) < 0) {
err = errno;
err = -1;
+ if (errno == E2BIG && data_offset != INVALID_SECTORS) {
+ pr_err("data-offset is too big for %s\n",
+ dn);
+ goto release;
+ }
if (sd == sra->devs &&
(errno == ENOENT || errno == E2BIG))
/* Early kernel, no 'new_offset' file,