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: Jamie Lokier
Subject: Re: [Qemu-devel] [PATCH] Disk image shared and exclusive locks.
Date: Mon, 7 Dec 2009 11:38:54 +0000
User-agent: Mutt/1.5.13 (2006-08-11)

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




reply via email to

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