Re: [Qemu-block] Non-flat command line option argument syntax

2017-02-05 Thread Markus Armbruster
Markus Armbruster writes: [...] > === Structured values === > > The dotted key convention messes with KEY syntax to permit structured > values. Works, but the more conventional way to support structured > values is a syntax for structured values. > > An obvious one is to use { KEY=VALUE, ...}

Re: [Qemu-block] [Qemu-devel] Non-flat command line option argument syntax

2017-02-05 Thread Markus Armbruster
Fam Zheng writes: > On Sat, 02/04 14:35, Markus Armbruster wrote: >> Fam Zheng writes: >> >> > On Thu, 02/02 20:42, Markus Armbruster wrote: >> >> === Comparison === >> >> >> >> In my opinion, dotted keys are weird and ugly, but at least they don't >> >> add to the quoting mess. Structured va

Re: [Qemu-block] [PATCH v12 03/16] qemu-io: Set "share-rw" flag together with read-only

2017-02-05 Thread Fam Zheng
On Sun, 02/05 22:52, Max Reitz wrote: > On 23.01.2017 13:30, Fam Zheng wrote: > > qemu-io is a low level tool to read or modify guest visible data, which > > implies the user knows very well what is being done. Allowing reading > > from a locked image is harmless in most cases, so do it. > > > > S

Re: [Qemu-block] [PATCH v12 00/16] block: Image locking series

2017-02-05 Thread Max Reitz
On 23.01.2017 13:30, Fam Zheng wrote: > v12: Fix test cases on old systems that doesn't have F_OFD_SETLK, such as RHEL > 6. [Patchew] > Trim the commit message of patch 15 to avoid bitrotting. > > v11: Move lock bytes from 1-2 to 0x10-0x12. [Daniel] > > v10: While we still don't have co

Re: [Qemu-block] [PATCH v12 05/16] block: Set "share-rw" flag in drive-backup when sync=none

2017-02-05 Thread Max Reitz
On 23.01.2017 13:30, Fam Zheng wrote: > In this case we may open the source's backing image chain multiple > times. Setting share flag means the new open won't try to acquire or > check any lock, once we implement image locking. > > Signed-off-by: Fam Zheng > --- > blockdev.c | 3 +++ > 1 file c

Re: [Qemu-block] [PATCH v12 04/16] qemu-img: Set "share-rw" flag in read-only commands

2017-02-05 Thread Max Reitz
On 23.01.2017 13:30, Fam Zheng wrote: > Checking the status of an image when it is being used by guest is > usually useful, and there is no risk of corrupting data, so don't let > the upcoming image locking feature limit this use case. > > Signed-off-by: Fam Zheng > --- > qemu-img.c | 10 +++

Re: [Qemu-block] [PATCH v12 03/16] qemu-io: Set "share-rw" flag together with read-only

2017-02-05 Thread Max Reitz
On 23.01.2017 13:30, Fam Zheng wrote: > qemu-io is a low level tool to read or modify guest visible data, which > implies the user knows very well what is being done. Allowing reading > from a locked image is harmless in most cases, so do it. > > Signed-off-by: Fam Zheng > --- > qemu-io.c | 2 ++

Re: [Qemu-block] [PATCH v12 02/16] block: Define BDRV_O_SHARE_RW

2017-02-05 Thread Max Reitz
On 23.01.2017 13:30, Fam Zheng wrote: > Signed-off-by: Fam Zheng > --- > include/block/block.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/include/block/block.h b/include/block/block.h > index 8b0dcda..243839d 100644 > --- a/include/block/block.h > +++ b/include/block/block.h > @@

Re: [Qemu-block] [PATCH v12 01/16] osdep: Add qemu_lock_fd and qemu_unlock_fd

2017-02-05 Thread Max Reitz
On 23.01.2017 13:30, Fam Zheng wrote: > They are wrappers of POSIX fcntl "file private locking", with a > convenient "try lock" wrapper implemented with F_OFD_GETLK. > > Signed-off-by: Fam Zheng > --- > include/qemu/osdep.h | 3 +++ > util/osdep.c | 48 ++

Re: [Qemu-block] [Qemu-devel] Non-flat command line option argument syntax

2017-02-05 Thread Max Reitz
On 04.02.2017 10:51, Markus Armbruster wrote: > "Richard W.M. Jones" writes: > >> On Thu, Feb 02, 2017 at 08:42:33PM +0100, Markus Armbruster wrote: >>> There's also the -drive file=json:... syntax. It's a bad fit for >>> QemuOpts, because QemuOpts and JSON fight for the comma. I'd show you >>>