[libvirt] [PATCHv2] Don't allow two or more disks to be mapped to the same image file

Hu Tao hutao at cn.fujitsu.com
Fri Mar 25 06:26:16 UTC 2011


On Thu, Mar 24, 2011 at 11:05:08AM +0000, Nathan Baum wrote:
> On Thu, 24 Mar 2011 16:46:14 +0800
> Hu Tao <hutao at cn.fujitsu.com> wrote:
> 
> > If two or more disks are mapped to the same image file, operating
> > on these disks at the same time may corrupt data stored in the
> > image file.
> > 
> > changes:
> > 
> > v2:
> > 
> > - allow it for read-only disks
> > - compare source files by inode number
> >
> 
> It doesn't seem that virDomainDiskConflict observes the "shared"
> property of a disk definition.
> 
> If all the disks are marked as shared, we should say there is no
> conflict.

Does the "shared" property mean virtual disks can be shared between
domains or the source of virtual disk can be shared between different
virtual disks? If it is the former, then the operation of sharing is
based on virtual disks, thus no need to care about this case.  But if
it is the latter, we indeed have to check for the "shared" property.

-- 
Thanks,
Hu Tao




More information about the libvir-list mailing list