]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Add some more settings of ignore_hw_compat
authorNeilBrown <neilb@suse.de>
Mon, 1 Aug 2011 02:21:19 +0000 (12:21 +1000)
committerNeilBrown <neilb@suse.de>
Mon, 1 Aug 2011 02:21:19 +0000 (12:21 +1000)
There are some more times when we don't care that the hardware doesn't
support the metadata:
 - when removing old metadata
 - when reporting the metadata present before over-writing it.

So set ignore_hw_compat in these cases.

Signed-off-by: NeilBrown <neilb@suse.de>
Kill.c
util.c

diff --git a/Kill.c b/Kill.c
index 29a43ea6bf20fe10071d43f4f9262a766e197a88..b841a5b73ca48b5f27881c63458017a37c511d66 100644 (file)
--- a/Kill.c
+++ b/Kill.c
@@ -59,6 +59,7 @@ int Kill(char *dev, struct supertype *st, int force, int quiet, int noexcl)
                close(fd);
                return 2;
        }
+       st->ignore_hw_compat = 1;
        rv = st->ss->load_super(st, fd, dev);
        if (force && rv >= 2)
                rv = 0; /* ignore bad data in superblock */
diff --git a/util.c b/util.c
index 55d171a0bc5e80a06deccaa7f704e571b0156f03..ce0323964562361ecb061227ad461304d58656fd 100644 (file)
--- a/util.c
+++ b/util.c
@@ -535,6 +535,7 @@ int check_raid(int fd, char *name)
        struct supertype *st = guess_super(fd);
 
        if (!st) return 0;
+       st->ignore_hw_compat = 1;
        st->ss->load_super(st, fd, name);
        /* Looks like a raid array .. */
        fprintf(stderr, Name ": %s appears to be part of a raid array:\n",