From: Chris Wright Subject: Re: Greater than 16 xvd devices for blkfront Date: Wed, 7 May 2008 09:04:55 -0700 Message-ID: <20080507160452.GA18143@sequoia.sous-sol.org> References: <48209705.4030005@redhat.com> <20080506174551.GA12858@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20080506174551.GA12858@redhat.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Daniel P. Berrange" Cc: Chris Lalancette , xen-devel List-Id: xen-devel@lists.xenproject.org * Daniel P. Berrange (berrange@redhat.com) wrote: > On Tue, May 06, 2008 at 01:36:05PM -0400, Chris Lalancette wrote: > > All, > > We've had a number of requests to increase the number of xvd devices that a > > PV guest can have. Currently, if you try to connect > 16 disks, you get an > > error from xend. The problem ends up being that both xend and blkfront assume > > that for dev_t, major/minor is 8 bits each, where in fact there are actually 10 > > bits for major and 22 bits for minor. Just a nit, it's actually 12:20. > > Therefore, it shouldn't really be a problem giving lots of disks to guests. > > The problem is in backwards compatibility, and the details. What I am > > initially proposing to do is to leave things where they are for /dev/xvd[a-p]; > > that is, still put the xenstore entries in the same place, and use 8 bits for > > the major and 8 bits for the minor. For anything above that, we would end up > > putting the xenstore entry in a different place, and pushing the major into the > > top 10 bits (leaving the bottom 22 bits for the minor); that way old guests > > won't fire when the entry is added, and we will add code to newer guests > > blkfront so that they will fire when they see that entry. Does anyone see any > > problems with this setup, or have any ideas how to do it better? > > Putting the xenstore entries in a different place is a non-starter. Too > many things look at that location already. When blktap was added and it > put xenstore entries in a different place it took months to track down > all the bugs this caused. I'm not sure what you mean? Since this is blkfront it'd be more like adding a virtual-device2 to extend the protocol. /* FIXME: Use dynamic device id if this is not set. */ err = xenbus_scanf(XBT_NIL, dev->nodename, "virtual-device", "%i", &vdevice); if (err != 1) { xenbus_dev_fatal(dev, err, "reading virtual-device"); return err; } IOW smth simple like: err = xenbus_scanf(XBT_NIL, dev->nodename, "virtual-device", "%i", &vdevice); if (err == -ENOENT) err = xenbus_scanf(XBT_NIL, dev->nodename, "virtual-device2", "%i", &vdevice); Then we can stop propagating the myth that dev_t is 8:8. thanks, -chris