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

zhang bo oscar.zhangbo at huawei.com
Fri Apr 17 01:40:19 UTC 2015

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.


More information about the libvir-list mailing list