diff options
author | NeilBrown <neilb@suse.de> | 2014-08-06 16:34:27 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2014-08-08 15:33:17 +1000 |
commit | a8461a61c241a25afedbe493c13d98a6e0cf4246 (patch) | |
tree | 129cf82707c536924406d7029fd66ae431eb577e /drivers/md/raid0.c | |
parent | ac7e50a3835de2321bcc511e4b6fe736c73c830f (diff) | |
download | linux-stable-a8461a61c241a25afedbe493c13d98a6e0cf4246.tar.gz linux-stable-a8461a61c241a25afedbe493c13d98a6e0cf4246.tar.bz2 linux-stable-a8461a61c241a25afedbe493c13d98a6e0cf4246.zip |
md/raid0: check for bitmap compatability when changing raid levels.
If an array has a bitmap, then it cannot be converted to raid0.
Reported-by: Xiao Ni <xni@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid0.c')
-rw-r--r-- | drivers/md/raid0.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index 407a99e46f69..cf91f5910c7c 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c @@ -685,6 +685,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); |