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 14/14]: libxenlight, checks before device deletio

To: Vincent Hanquez <vincent.hanquez@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 14/14]: libxenlight, checks before device deletion and addition
From: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
Date: Tue, 01 Dec 2009 09:24:38 -0500
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>
Delivery-date: Tue, 01 Dec 2009 06:25:00 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20091201062935.GE15791@xxxxxxxxxxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4B141A7A.3090308@xxxxxxxxxxxxxxxx> <20091201062935.GE15791@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.23 (X11/20090817)
Agreed in that it is a weak check being non-transactional. But some check should be there, shouldn't it? Just throwing it out there. The other checks are kosher I assume?
Andres
Vincent Hanquez wrote:
On Mon, Nov 30, 2009 at 07:18:18PM +0000, Andres Lagar-Cavilla wrote:
Proper existential checks before adding or deleting a
device, i.e. return error if:

- Adding a device to a non-existent domain
- Adding a device twice
- Deleting a non-existent device
- Deleting a device from a non-existent domain

Signed-off-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>


you should not check the non-existency of a domain. this is pointless
since just after you check the domain might have gone away. also you might
think of a mode where you populate the xenstore tree before creating the domain
.. nobody does that, but I don't think there's any major stopper to do that or
that it would be a bad idea either.

Same reason that should it not check for device existency outside of the
transaction, otherwise someome might have added it in the meantime.

PS: please don't call libxl_free, that's really unnecessary at this stage,
until we sort memory handling completly. (there's a "GC" for now)



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

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [Xen-devel] [PATCH 14/14]: libxenlight, checks before device deletion and addition, Andres Lagar-Cavilla <=