Re: [PATCH mdadm] Subdevs can't be all missing when create raid device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/26/2018 03:42 AM, Xiao Ni wrote:
> Signed-off-by: Xiao Ni <xni@xxxxxxxxxx>
> ---
>  Create.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/Create.c b/Create.c
> index 239545f..50142d8 100644
> --- a/Create.c
> +++ b/Create.c
> @@ -475,6 +475,10 @@ int Create(struct supertype *st, char *mddev,
>  			close(fd);
>  		}
>  	}
> +	if (missing_disks == dnum) {
> +		pr_err("Subdevs can't be all missing\n");
> +		return 1;
> +	}
>  	if (s->raiddisks + s->sparedisks > st->max_devs) {
>  		pr_err("Too many devices: %s metadata only supports %d\n",
>  			st->ss->name, st->max_devs);
> 

Applied!

Thanks,
Jes

PS: This looks like a great candidate for a unit test :)

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux