mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
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 <[email protected]> Signed-off-by: NeilBrown <[email protected]>
This commit is contained in:
parent
ac7e50a383
commit
a8461a61c2
1 changed files with 6 additions and 0 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue