[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for-2.7 v2 05/17] raw-posix: Implement .bdrv_loc
From: |
Daniel P. Berrange |
Subject: |
Re: [Qemu-devel] [PATCH for-2.7 v2 05/17] raw-posix: Implement .bdrv_lockf |
Date: |
Tue, 19 Apr 2016 14:45:02 +0100 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
On Tue, Apr 19, 2016 at 02:36:05PM +0100, Richard W.M. Jones wrote:
>
> I'd prefer some kind of no lock / ignore lock. There is a legitimate
> case where you want to have the shared lock behaviour, but also a
> legitimate one for turning it off. I'm not opposed to the idea --
> there are very real cases where your patch saves people from
> themselves.
[snip]
> Off topic: How does this patch deal with genuinely shared (writable)
> disks, as used in cluster filesystems?
This series does add support for a lock_image=no parameter for disks
which turns off all locking. IIUC, this was intended for use when
the disk image must be shared between guests
IOW, this series is doing the following:
- read-only, exclusive -> F_RDLOCK
- writable, shared -> no locking
- writable, exclusive -> F_WRLOCK
This stuff leaves open possibility of mistakes if one VM is
given a disk in write+exclusive, while other VM gets the
same disk in write+shared mode.
In virtlockd we took a different approach to this:
- read-only, exclusive -> no locking
- writable, shared -> F_RDLOCK
- writable, exclusive -> F_WRLOCK
because this lets the kernel prevent case where the disk image is presented
in write+shared mode to one VM and write+exlcusive mode to another VM.
Not doing any locking at all in readonly case allowed for the scenario
needed with libguestfs where they create an overlay for disks in use.
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
- Re: [Qemu-devel] [PATCH for-2.7 v2 05/17] raw-posix: Implement .bdrv_lockf, (continued)
Re: [Qemu-devel] [PATCH for-2.7 v2 05/17] raw-posix: Implement .bdrv_lockf, Richard W.M. Jones, 2016/04/17
- Re: [Qemu-devel] [PATCH for-2.7 v2 05/17] raw-posix: Implement .bdrv_lockf, Fam Zheng, 2016/04/17
- Re: [Qemu-devel] [PATCH for-2.7 v2 05/17] raw-posix: Implement .bdrv_lockf, Richard W.M. Jones, 2016/04/18
- Re: [Qemu-devel] [PATCH for-2.7 v2 05/17] raw-posix: Implement .bdrv_lockf, Fam Zheng, 2016/04/19
- Re: [Qemu-devel] [PATCH for-2.7 v2 05/17] raw-posix: Implement .bdrv_lockf, Richard W.M. Jones, 2016/04/19
- Re: [Qemu-devel] [PATCH for-2.7 v2 05/17] raw-posix: Implement .bdrv_lockf, Fam Zheng, 2016/04/19
- Re: [Qemu-devel] [PATCH for-2.7 v2 05/17] raw-posix: Implement .bdrv_lockf, Richard W.M. Jones, 2016/04/19
- Re: [Qemu-devel] [PATCH for-2.7 v2 05/17] raw-posix: Implement .bdrv_lockf,
Daniel P. Berrange <=
Re: [Qemu-devel] [PATCH for-2.7 v2 05/17] raw-posix: Implement .bdrv_lockf, Daniel P. Berrange, 2016/04/19
Re: [Qemu-devel] [PATCH for-2.7 v2 05/17] raw-posix: Implement .bdrv_lockf, Richard W.M. Jones, 2016/04/19
[Qemu-devel] [PATCH for-2.7 v2 06/17] gluster: Implement .bdrv_lockf, Fam Zheng, 2016/04/14
[Qemu-devel] [PATCH for-2.7 v2 07/17] rbd: Implement image locking, Fam Zheng, 2016/04/14