Grow: only warn about incompatible metadata when no fallback available.

We might be trying to set_new_data_offset() for RAID10, when it is
a necessary requirement, or for RAID5 where it is optional.
In the latter case, a message about metadata versions is no helpful.

Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown 2015-05-14 11:17:39 +10:00
parent 2609f33902
commit dd243f561f
1 changed files with 3 additions and 1 deletions

4
Grow.c
View File

@ -2213,7 +2213,9 @@ static int set_new_data_offset(struct mdinfo *sra, struct supertype *st,
if (info2.space_before == 0 &&
info2.space_after == 0) {
/* Metadata doesn't support data_offset changes */
pr_err("%s: Metadata version doesn't support data_offset changes\n", devname);
if (!can_fallback)
pr_err("%s: Metadata version doesn't support data_offset changes\n",
devname);
goto fallback;
}
if (before > info2.space_before)