[dm-devel] [PATCH 1/2] dm-raid: Fix minimal device check

Heinz Mauelshagen heinzm at redhat.com
Wed Oct 28 19:39:48 UTC 2015


NACK

md can drive a single disk raid5.



On 10/28/2015 07:50 PM, Andy Grover wrote:
> Check raid_type->minimal_devs instead of parity_devs. minimal_devs is used
> nowhere else (and makes sense to use here) so I think this is what was
> intended.
>
> Signed-off-by: Andy Grover <agrover at redhat.com>
> ---
>   drivers/md/dm-raid.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c
> index a090121..5941cfd 100644
> --- a/drivers/md/dm-raid.c
> +++ b/drivers/md/dm-raid.c
> @@ -151,7 +151,7 @@ static struct raid_set *context_alloc(struct dm_target *ti, struct raid_type *ra
>   	unsigned i;
>   	struct raid_set *rs;
>   
> -	if (raid_devs <= raid_type->parity_devs) {
> +	if (raid_devs < raid_type->minimal_devs) {
>   		ti->error = "Insufficient number of devices";
>   		return ERR_PTR(-EINVAL);
>   	}




More information about the dm-devel mailing list