Re: [libvirt] [PATCH] Add source check before attaching device

2015-04-16 Thread Jiri Denemark
On Thu, Apr 16, 2015 at 16:51:52 +0800, zhang bo wrote:
 Source device/file is not unique now, we should check it when attach device.

The check is vary fragile and unreliable. It would be very hard (perhaps
even impossible) to really detect that the two disks/filesystems point
to the same source, which means libvirt would not really prevent anyone
from attaching a single source twice. Moreover, the code as written
would incorrectly refuse to attach disks that do not point to the same
source (network disks, e.g.).

But anyway, I don't think libvirt should be doing this in general, so
NACK to this idea.

Moreover, you should be able to achieve the same goal (and even more) by
using a locking driver.

Jirka

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [PATCH] Add source check before attaching device

2015-04-16 Thread zhang bo
On 2015/4/16 17:44, Jiri Denemark wrote:

 On Thu, Apr 16, 2015 at 16:51:52 +0800, zhang bo wrote:
 Source device/file is not unique now, we should check it when attach device.
 
 The check is vary fragile and unreliable. It would be very hard (perhaps
 even impossible) to really detect that the two disks/filesystems point
 to the same source, which means libvirt would not really prevent anyone
 from attaching a single source twice. Moreover, the code as written
 would incorrectly refuse to attach disks that do not point to the same
 source (network disks, e.g.).
 
 But anyway, I don't think libvirt should be doing this in general, so
 NACK to this idea.
 
 Moreover, you should be able to achieve the same goal (and even more) by
 using a locking driver.
 
 Jirka
 
 


That's true! we didn't think of that. Thank you Jirka.

oscar

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list