]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/md/raid0.c
Merge tag 'renesas-soc-fixes-for-v3.19' of git://git.kernel.org/pub/scm/linux/kernel...
[karo-tx-linux.git] / drivers / md / raid0.c
index 407a99e46f6993a770c21fdfff1972b7f64063b6..ba6b85de96d209635e640efb19a6569bfd9e8a38 100644 (file)
@@ -1,10 +1,9 @@
 /*
    raid0.c : Multiple Devices driver for Linux
-             Copyright (C) 1994-96 Marc ZYNGIER
+            Copyright (C) 1994-96 Marc ZYNGIER
             <zyngier@ufr-info-p7.ibp.fr> or
             <maz@gloups.fdn.fr>
-             Copyright (C) 1999, 2000 Ingo Molnar, Red Hat
-
+            Copyright (C) 1999, 2000 Ingo Molnar, Red Hat
 
    RAID-0 management functions.
 
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
    any later version.
-   
+
    You should have received a copy of the GNU General Public License
    (for example /usr/src/linux/COPYING); if not, write to the Free
-   Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  
+   Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
 #include <linux/blkdev.h>
@@ -685,6 +684,12 @@ static void *raid0_takeover(struct mddev *mddev)
         *  raid10 - assuming we have all necessary active disks
         *  raid1 - with (N -1) mirror drives faulty
         */
+
+       if (mddev->bitmap) {
+               printk(KERN_ERR "md/raid0: %s: cannot takeover array with bitmap\n",
+                      mdname(mddev));
+               return ERR_PTR(-EBUSY);
+       }
        if (mddev->level == 4)
                return raid0_takeover_raid45(mddev);