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>
This commit is contained in:
NeilBrown 2013-05-21 16:50:05 +10:00
parent 8192902ff7
commit d7e1f52bb8
1 changed files with 5 additions and 0 deletions

5
Grow.c
View File

@ -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,