qemu-devel
[Top][All Lists]
Advanced

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

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


From: Richard W.M. Jones
Subject: Re: [Qemu-devel] [PATCH VERSION 2] Disk image shared and exclusive locks.
Date: Tue, 8 Dec 2009 10:25:33 +0000
User-agent: Mutt/1.5.18 (2008-05-17)

On Tue, Dec 08, 2009 at 11:00:17AM +0100, Kevin Wolf wrote:
> Am 07.12.2009 15:16, schrieb Richard W.M. Jones:
> > Here's a second go at this patch.  The only change is that we add a
> > second parameter (backinglock=none|shared|exclusive) which can be used
> > to control locking on the first level (only) of backing disk.
> 
> And what about the backing file of the backing file? ;-) This approach
> feels wrong somehow.

I was under the impression that the grandparent backing file is never
written to (eg. by commit or whatever), and so no locking would be
required.  That's why the backinglock doesn't get inherited
recursively, and I checked that too.  However maybe since it is being
read, we should acquire shared locks for grandparent and above.

> We need to infer the locking for backing file from the COW file
> (none => none; shared/exclusive => shared; commit acquires an
> exclusive lock temporarily, but still can't prevent corruption with
> turned off VMs)
>
> You probably should add the locking flags to bdrv_open calls in
> qemu-img, too.

OK.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
New in Fedora 11: Fedora Windows cross-compiler. Compile Windows
programs, test, and build Windows installers. Over 70 libraries supprt'd
http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw




reply via email to

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