]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/md/raid5.c
Fail safely when trying to grow an array with a write-intent bitmap.
[linux-2.6-omap-h63xx.git] / drivers / md / raid5.c
index 40e9396756573c204b50dee7bdd9517f57f9dab0..17e0953c3c06b1d004cc608d8cfd4621f886b76e 100644 (file)
@@ -4446,6 +4446,9 @@ static int raid5_check_reshape(mddev_t *mddev)
                return -EINVAL; /* Cannot shrink array or change level yet */
        if (mddev->delta_disks == 0)
                return 0; /* nothing to do */
+       if (mddev->bitmap)
+               /* Cannot grow a bitmap yet */
+               return -EBUSY;
 
        /* Can only proceed if there are plenty of stripe_heads.
         * We need a minimum of one full stripe,, and for sensible progress