]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Grow: only warn about incompatible metadata when no fallback available.
authorNeilBrown <neilb@suse.de>
Thu, 14 May 2015 01:17:39 +0000 (11:17 +1000)
committerNeilBrown <neilb@suse.de>
Thu, 14 May 2015 01:17:39 +0000 (11:17 +1000)
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>
Grow.c

diff --git a/Grow.c b/Grow.c
index 9a573fd49f5db48a7cd5eabd9492932e3398a50d..568e3996f2d5ed95b7c0712af2a7f040650b2562 100644 (file)
--- a/Grow.c
+++ b/Grow.c
@@ -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)