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] Fix bug #331

To: Dan Smith <danms@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Fix bug #331
From: Ewan Mellor <ewan@xxxxxxxxxxxxx>
Date: Fri, 25 Nov 2005 23:13:04 +0000
Cc: Xen Developers <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 25 Nov 2005 23:13:00 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <87k6ezp0y4.fsf@xxxxxxxxxxxxxxxxxxxxxxxx>
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>
References: <87k6ezp0y4.fsf@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
On Wed, Nov 23, 2005 at 12:24:19PM -0800, Dan Smith wrote:

> This patch adds the following checks to xend:
> 
> - Make sure a block device is not attached to more than one DomU at a
>   time
> - Make sure a block device is not attached to a DomU if it is mounted
>   in Dom0
> - Make sure a block device exists before even trying to attach it
> - Make sure files specified with "file:" actually exist and have the
>   necessary permissions
> 
> This makes tests 11_block_attach and 12_block_attach pass.
> 
> In order to check if a device is attached to another DomU, I search
> the /local/domain/0/device/vbd/*/*/physical-device nodes to see if any
> DomU had the device already.  Although this is ugly, I think it's the
> best way, so that we don't depend on any xend internal state.

Thanks for your patch Dan.  Unfortunately, Xend is not the right place for
these checks.  We have to worry about device configuration even when it's not
performed through Xend -- the drivers will configure the device if you write
to the store, even if you don't go through Xend.  With that in mind, these
safety checks need to be lower down in the system.  I've put them into the
hotplug scripts (the physical devices support has been checked in, and support
for loopback files is on its way).

I've applied the fix to 12_block_attach.

Cheers,

Ewan.

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

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