WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH 0/4]: Expand xvd to support > 16 devices

To: Chris Lalancette <clalance@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 0/4]: Expand xvd to support > 16 devices
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Mon, 23 Jun 2008 20:24:01 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 23 Jun 2008 12:24:50 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <485FEAD4.3090009@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Newsgroups: chiark.mail.xen.devel
References: <485FEAD7.9070206@xxxxxxxxxx> <485FEAD4.3090009@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Chris Lalancette writes ("[Xen-devel] [PATCH 0/4]: Expand xvd to support > 16 
devices"):
> I ended up implementing Ian Jackson's suggestion here:
>   http://lists.xensource.com/archives/html/xen-devel/2008-05/msg00231.html
> Basically, I left the old format alone, but added a new format that
> looks like:
> 
>  1 << 28 | disk << 8 | partition       xvd, disks or partitions 16 onwards

I approve of this, obviously.  But I think your patch lacks some error
checks.  These are most critical in the guest, as the guest's
interpretation of the interface will effectively be frozen.

When the guest is enumerating the devices, it should be sure to
check that the block device number integer matches one of the expected
forms, as I wrote in my message.  If the number does not, then that
vbd should be ignored with a warning message.

This applies also to the partition numbers which you are currently
limiting to 15.  That's fine but you should put in a check so that
out-of-range partition numbers are ignored rather than causing
unexpected behaviours.  (I'll admit that I haven't analysed your code
in detail to determine exactly what the behaviour would be ...)

(Obviously even adding this check now won't prevent attempts to
specify out of range devices from totally breaking even older guests
which lack proper checking.  But there's no reason to perpetuate these
bugs.)

Also I think you should include an API changelog entry.

Thanks,
Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>