[libvirt] [PATCH] add the check whether the domain has alreadyused a disk which attach

S.Sakamoto fj0588di at aa.jp.fujitsu.com
Fri Nov 14 08:28:54 UTC 2008


> > > > > > "attach-disk" does not give an error,
> > > > > > when the domain which is attached has already used the source which attach.
> > > > > > This has danger of the data corruption.
> > > > > > 
> > > > > > I make the patch to add the check of this.
> > > > > > This patch outputs an error,
> > > > > > when the domain which is attached has already used the source which attach.
> > > > > 
> > > > > What hypervisor were you testing with ?  AFAIR, XenD should already raise
> > > > > an appropriate error in this scenario.
> > > > > 
> > > > XenD Don't check this
> > > > when I confirm it in xen(cs 18756:5fd51e1e9c79).
> > > > 
> > > > Therefore,
> > > > I think that it had better add check to virsh.c,
> > > > because this should be checked whether xen or qemu.
> > > 
> > > No, because then the check is only performed for people using virsh, and
> > > would have to be duplicated across every single other application using
> > > libvirt. If it is done in the XenD or libvirtd at time of use, then all
> > > users of libvirt are automatically protected.
> > Of course, it is the best if it guarded in Xend.
> > But, the user may be not protected depending on cs of xen,
> > 
> > Had better it attach check-method in libvirt.c to protect all users of libvirt ?
> 
>   yes the patch need to be done in libvirt.c to protect applications
> which are not virsh,
> > Of course, it is the best if it guarded in Xend.
> > But, the user may be not protected depending on cs of xen,
> > 
> > Had better it attach check-method in libvirt.c to protect all users of libvirt ?
> 
>   yes the patch need to be done in libvirt.c to protect applications
> which are not virsh,
> 
I remake a patch so that user is protected in libvirt.c

Thanks,
Shigeki Sakamoto.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: attach-disk.patch
Type: application/octet-stream
Size: 3782 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20081114/1373463a/attachment-0001.obj>


More information about the libvir-list mailing list