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: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH] Disk image shared and exclusive locks.
Date: Sat, 05 Dec 2009 19:31:05 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091203 Fedora/3.0-3.13.rc2.fc12 Thunderbird/3.0

On 12/05/2009 12:29 AM, Anthony Liguori wrote:

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.


Well shared/exclusive or read/write locks support exactly that.

For non-raw storage we should take the locks unconditionally, since there is no useful way to share such images opened for write access.

--
Do not meddle in the internals of kernels, for they are subtle and quick to 
panic.





reply via email to

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