MAX_GNBD limit

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

 



Hi all,

I'm playing with a lot of gnbd devices and hit the following limit in gnbd.h:

#define MAX_GNBD 128


I wonder what would be the side effect of changing this value for a larger one (not speaking about memory consumption) ?

I think there is another place in gnbd.c where we could have problems :

static int gnbd_ctl_ioctl(struct inode *inode, struct file *file,
                     unsigned int cmd, unsigned long arg)
{
[...]
        case GNBD_DO_IT:
                if (copy_from_user(&req, (do_it_req_t *)arg, sizeof(req)))
                        return -EFAULT;
                if (req.minor >= 128)
                        return -EINVAL;
                dev = &gnbd_dev[req.minor];
                BUG_ON(dev->magic != GNBD_MAGIC);

Shouldn't the (req.minor >= 128) be changed for (req.minor >= MAX_GNBD) or does the value 128 means something else here ??

I'm not a kernel coder, so I apologize if this sounds stupid. I'm not sure I understand everything as it should be ;-)


Anyway, we are currently trying and testing, but this takes time and if someone can explain me why it will or won't work, it could be faster this way :p


Regards,

--
Sylvain COUTANT

ADVISEO
http://www.adviseo.fr/
http://www.open-sp.fr/



--

Linux-cluster@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/linux-cluster

[Index of Archives]     [Corosync Cluster Engine]     [GFS]     [Linux Virtualization]     [Centos Virtualization]     [Centos]     [Linux RAID]     [Fedora Users]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Camping]

  Powered by Linux