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

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

 




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@xxxxxxxxxx>
---
  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);
  	}

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel



[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux