]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - super-ddf.c
IMSM/DDF: don't recognised these metadata on partitions.
[thirdparty/mdadm.git] / super-ddf.c
index 3feea57796e1242201095ca85659b9279902a1ff..0e6f1e53394de81a9aace6a3a5c8999ed00cb2a0 100644 (file)
@@ -783,6 +783,10 @@ static int load_super_ddf(struct supertype *st, int fd,
        if (get_dev_size(fd, devname, &dsize) == 0)
                return 1;
 
+       if (test_partition(fd))
+               /* DDF is not allowed on partitions */
+               return 1;
+
        /* 32M is a lower bound */
        if (dsize <= 32*1024*1024) {
                if (devname)