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