]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - super-intel.c
Merge branch 'devel' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/mdadm...
[thirdparty/mdadm.git] / super-intel.c
index 841ba90e2336483ae39f69bd25e9e10fd3513d67..94f46cac1a021954c34154f8746b3e83489f535e 100644 (file)
@@ -2821,7 +2821,7 @@ static int validate_geometry_imsm_volume(struct supertype *st, int level,
                 * 'raiddisks' device extents of size 'size' at a given
                 * offset
                 */
-               unsigned long long minsize = size*2 /* convert to blocks */;
+               unsigned long long minsize = size;
                unsigned long long start_offset = ~0ULL;
                int dcnt = 0;
                if (minsize == 0)
@@ -2951,6 +2951,14 @@ static int validate_geometry_imsm(struct supertype *st, int level, int layout,
                                                        verbose);
        }
        
+       if (!dev) {
+               if (st->sb && freesize) {
+                       /* Should do auto-layout here */
+                       fprintf(stderr, Name ": IMSM does not support auto-layout yet\n");
+                       return 0;
+               }
+               return 1;
+       }
        if (st->sb) {
                /* creating in a given container */
                return validate_geometry_imsm_volume(st, level, layout,