qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] Disk image shared and exclusive locks.


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH] Disk image shared and exclusive locks.
Date: Fri, 04 Dec 2009 16:29:47 -0600
User-agent: Thunderbird 2.0.0.23 (X11/20090825)

Richard W.M. Jones wrote:
The idea would be for management tools (eg. libvirt) to add the lock
parameter for all virtual machines that they manage.

I don't see how this is worse than what we have now -- ie. no
possibility of locking at all and a very real risk of disk corruption.

Anyway, we could make the locking mandatory.  I believe that the
locking under Win32 (using LockFileEx) is already mandatory.  With
mandatory locks it would be pretty watertight in the single node case.
Alternatively how about making lock=exclusive the default?

Well disk sharing isn't actually bad as long as it's raw or a physical device.

For qcow2, it's very complicated by backing files because we really need to express the concept of a read-write lock.

That is, as long as the guests are opening the file read only, you should allow many readers. However, you should prevent anyone from opening with write permission. Likewise, writes should prevent future reads.

Regards,

Anthony Liguori




reply via email to

[Prev in Thread] Current Thread [Next in Thread]