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

Re: [Xen-devel] [PATCH] Fix bug #331



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.