Richard W.M. Jones wrote: > > That doesn't work in the case of setting up a clustered filesystem > > shared between guests. That requires that the disk be opened writable, > > but with a shared (F_RDLOCK) lock. > > I think Jamie's point is that you might as well use no locking at all > in this configuration. It's hard to see what lock=shared is > protecting you against.
Exactly. Shared locks are only useful if you have an exclusive locker to protect against, and in the case of a shared-disk cluster, there isn't one. Except, perhaps, some admin tools when the cluster is down. That said, with shared partitioned disk images, it could be useful to exclusively lock the individual partitions. I think by then we're involving a tool outside qemu, so it can take the lock itself. That's a reason why qemu's F_WRLOCK should cover the whole range of file offsets, not just say the first byte. -- Jamie