Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a17184a9 authored by NeilBrown's avatar NeilBrown Committed by Linus Torvalds
Browse files

md: allow an md array to appear with 0 drives if it has external metadata

parent ca388059
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -4647,7 +4647,8 @@ static int md_ioctl(struct inode *inode, struct file *file,
	 */
	/* if we are not initialised yet, only ADD_NEW_DISK, STOP_ARRAY,
	 * RUN_ARRAY, and GET_ and SET_BITMAP_FILE are allowed */
	if (!mddev->raid_disks && cmd != ADD_NEW_DISK && cmd != STOP_ARRAY
	if ((!mddev->raid_disks && !mddev->external)
	    && cmd != ADD_NEW_DISK && cmd != STOP_ARRAY
	    && cmd != RUN_ARRAY && cmd != SET_BITMAP_FILE
	    && cmd != GET_BITMAP_FILE) {
		err = -ENODEV;