[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH v5 00/27] block: Lock images when o
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH v5 00/27] block: Lock images when opening |
Date: |
Tue, 24 May 2016 14:46:15 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Am 24.05.2016 um 13:48 hat Richard W.M. Jones geschrieben:
> On Tue, May 17, 2016 at 03:35:09PM +0800, Fam Zheng wrote:
> > v5: - Change "lock-image=on/off" to "lock-mode=exclusive/shared/off".
> > Default is "lock-mode=exclusive" to exclusively lock RW images and
> > shared
> > lock RO images; with lock-mode="shared", RW images are shared locked
> > too;
> > lock-mode=off turns off image locking completely.
> > - Use F_OFD_SETLK fcntl so that close/dup on different fds are not a
> > problem.
> > - Update test cases.
>
> My comments after testing this patch set:
>
> * It's not possible to tell from the `qemu -help' output that this
> binary supports the lock-mode option. Please add this to the -help
> output (under `-drive') so we can detect it in qemu.
>
> * I patched libguestfs to add the `lock-image=off' flag when the drive
> is added readonly. This permits libguestfs to read live guests. I
> also checked that writing to live guests is now forbidden, and it
> is, which is good. In the write-to-live-guest case libguestfs will
> now fail with:
>
> qemu-system-x86_64: -drive
> file=/var/tmp/centos-6.img,cache=writeback,id=hd0,if=none: Failed to lock
> image
>
> So definitely we need this option to be reflected in the -help output.
While you are right that maybe we should mentioned the new options in
-help for human users, help texts are not meant to be parsed. If you do
parse them and a changed help text breaks your code in the future,
that's your problem.
Consider using query-qmp-schema instead, that one is actually meant to
be processed by machines.
Kevin
- Re: [Qemu-block] [PATCH v5 22/27] qemu-iotests: 030: Disable image lock when checking test image, (continued)
- [Qemu-block] [PATCH v5 24/27] iotests: Disable image locking in 085, Fam Zheng, 2016/05/17
- [Qemu-block] [PATCH v5 25/27] tests: Use null-co:// instead of /dev/null, Fam Zheng, 2016/05/17
- [Qemu-block] [PATCH v5 26/27] block: Turn on image locking by default, Fam Zheng, 2016/05/17
- [Qemu-block] [PATCH v5 27/27] qemu-iotests: Add test case 153 for image locking, Fam Zheng, 2016/05/17
- Re: [Qemu-block] [Qemu-devel] [PATCH v5 00/27] block: Lock images when opening, Richard W.M. Jones, 2016/05/24
- Re: [Qemu-block] [Qemu-devel] [PATCH v5 00/27] block: Lock images when opening,
Kevin Wolf <=