Re: [Qemu-block] [PATCH v8 00/36] block: Image locking series

2016-10-21 Thread Max Reitz
On 30.09.2016 14:09, Fam Zheng wrote: > Hi all, > > I wanted to post something before the long holiday as promised, but I couldn't > refine or test enough due to limited time. Please take this as an RFC and do > a > high level review. Thanks. I did that, looked at some patches in more and at

Re: [Qemu-block] [PATCH v8 12/36] virtio-blk: Apply lock-mode when realize

2016-10-21 Thread Max Reitz
On 22.10.2016 02:08, Max Reitz wrote: > On 30.09.2016 14:09, Fam Zheng wrote: >> Signed-off-by: Fam Zheng >> --- >> hw/block/virtio-blk.c | 5 + >> 1 file changed, 5 insertions(+) >> >> diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c >> index 3a6112f..ce65615

Re: [Qemu-block] [PATCH v8 15/36] qdev: Add "lock-mode" to block device options

2016-10-21 Thread Max Reitz
On 30.09.2016 14:09, Fam Zheng wrote: > Signed-off-by: Fam Zheng > --- > hw/core/qdev-properties.c| 10 ++ > include/hw/block/block.h | 1 + > include/hw/qdev-properties.h | 3 +++ > 3 files changed, 14 insertions(+) Why don't you add _conf.lock_mode in this

Re: [Qemu-block] [PATCH v8 12/36] virtio-blk: Apply lock-mode when realize

2016-10-21 Thread Max Reitz
On 30.09.2016 14:09, Fam Zheng wrote: > Signed-off-by: Fam Zheng > --- > hw/block/virtio-blk.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c > index 3a6112f..ce65615 100644 > --- a/hw/block/virtio-blk.c > +++

Re: [Qemu-block] [PATCH v8 05/36] raw-posix: Add image locking support

2016-10-21 Thread Max Reitz
On 30.09.2016 14:09, Fam Zheng wrote: > virtlockd in libvirt locks the first byte, we lock byte 1 to avoid > the intervene. s/the intervene/a conflict/? > > Both file and host device protocols are covered. > > The complication is with reopen. We have three different locking states, > namely

Re: [Qemu-block] [PATCH v8 04/36] osdep: Add qemu_lock_fd and qemu_unlock_fd

2016-10-21 Thread Max Reitz
On 30.09.2016 14:09, Fam Zheng wrote: > They are wrappers of POSIX fcntl "file private locking". > > Signed-off-by: Fam Zheng > --- > include/qemu/osdep.h | 2 ++ > util/osdep.c | 29 + > 2 files changed, 31 insertions(+) > > diff --git

Re: [Qemu-block] [PATCH 11/22] qcow2-bitmap: add qcow2_store_persistent_bitmaps()

2016-10-21 Thread Eric Blake
On 10/21/2016 02:44 PM, Max Reitz wrote: >> Now I think I can drop this assignment, as bdrv_aligned_preadv have >> 'return ret < 0 ? ret : 0;' in the end... Am I right? Can bdrv_pwrite >> and friends return positive value on success? > > I think so, but if they do return positive value they're

Re: [Qemu-block] [PATCH v8 03/36] block: Introduce image file locking

2016-10-21 Thread Max Reitz
On 30.09.2016 14:09, Fam Zheng wrote: > Block drivers can implement this new operation .bdrv_lockf to actually lock > the > image in the protocol specific way. > > Signed-off-by: Fam Zheng > --- > block.c | 52 >

Re: [Qemu-block] [PATCH v8 02/36] qapi: Add ImageLockMode

2016-10-21 Thread Max Reitz
On 30.09.2016 14:09, Fam Zheng wrote: > Signed-off-by: Fam Zheng > --- > qapi/block-core.json | 18 ++ > 1 file changed, 18 insertions(+) > > diff --git a/qapi/block-core.json b/qapi/block-core.json > index 92193ab..22e8d04 100644 > --- a/qapi/block-core.json >

Re: [Qemu-block] [PATCH v3] block/replication: Clarify 'top-id' parameter usage

2016-10-21 Thread Max Reitz
On 12.10.2016 06:50, Changlong Xie wrote: > The replication driver only supports the 'top-id' parameter for the > secondary side; it must not be supplied for the primary side. > > Reviewed-by: Eric Blake > Signed-off-by: Changlong Xie > --- >

Re: [Qemu-block] [PATCH 0/2] less confusing block file names

2016-10-21 Thread John Snow
On 10/19/2016 09:11 PM, Eric Blake wrote: Based on a suggestion here: https://lists.gnu.org/archive/html/qemu-devel/2016-10/msg00350.html Eric Blake (2): block: Rename raw_bsd to raw.c block: rename raw-{posix,win32} to file-*.c include/block/block_int.h | 2 +-

Re: [Qemu-block] [PATCH 11/22] qcow2-bitmap: add qcow2_store_persistent_bitmaps()

2016-10-21 Thread Max Reitz
On 17.10.2016 19:19, Vladimir Sementsov-Ogievskiy wrote: > On 07.10.2016 22:24, Max Reitz wrote: >> On 30.09.2016 12:53, Vladimir Sementsov-Ogievskiy wrote: >>> Realize block bitmap stroing interface, to allow qcow2 images store >>> persistent bitmaps. >>> >>> Signed-off-by: Vladimir

Re: [Qemu-block] [PATCH 12/22] qcow2-bitmap: add IN_USE flag

2016-10-21 Thread Max Reitz
On 21.10.2016 17:34, Vladimir Sementsov-Ogievskiy wrote: > 07.10.2016 22:44, Max Reitz пишет: >> On 30.09.2016 12:53, Vladimir Sementsov-Ogievskiy wrote: >>> This flag means that the bitmap is now in use by the software or was not >>> successfully saved. In any way, with this flag set the bitmap

Re: [Qemu-block] [PATCH 07/22] qcow2-bitmap: introduce auto-loading bitmaps

2016-10-21 Thread Max Reitz
On 20.10.2016 14:22, Vladimir Sementsov-Ogievskiy wrote: > On 01.10.2016 19:26, Max Reitz wrote: >> On 30.09.2016 12:53, Vladimir Sementsov-Ogievskiy wrote: >>> Auto loading bitmaps are bitmaps in Qcow2, with AUTO flag set. They are > > [...] > >> diff --git a/block/qcow2.c b/block/qcow2.c >>

Re: [Qemu-block] [Qemu-devel] [PATCH v11 01/19] block: Add bdrv_drain_all_{begin, end}()

2016-10-21 Thread John Snow
On 10/21/2016 03:03 PM, Alberto Garcia wrote: On Fri 21 Oct 2016 08:55:51 PM CEST, John Snow wrote: bdrv_drain_all() doesn't allow the caller to do anything after all pending requests have been completed but before block jobs are resumed. This patch splits

Re: [Qemu-block] [PATCH v11 01/19] block: Add bdrv_drain_all_{begin, end}()

2016-10-21 Thread Alberto Garcia
On Fri 21 Oct 2016 08:55:51 PM CEST, John Snow wrote: bdrv_drain_all() doesn't allow the caller to do anything after all pending requests have been completed but before block jobs are resumed. This patch splits bdrv_drain_all() into _begin() and _end()

Re: [Qemu-block] [PATCH v11 01/19] block: Add bdrv_drain_all_{begin, end}()

2016-10-21 Thread John Snow
On 10/20/2016 04:25 AM, Alberto Garcia wrote: On Wed 19 Oct 2016 07:11:20 PM CEST, Kevin Wolf wrote: bdrv_drain_all() doesn't allow the caller to do anything after all pending requests have been completed but before block jobs are resumed. This patch splits bdrv_drain_all() into _begin()

Re: [Qemu-block] [Qemu-devel] [PATCH v14 02/21] qdict: implement a qdict_crumple method for un-flattening a dict

2016-10-21 Thread Max Reitz
On 21.10.2016 11:58, Markus Armbruster wrote: > "Daniel P. Berrange" writes: > >> On Tue, Oct 18, 2016 at 04:32:13PM +0200, Markus Armbruster wrote: >>> "Daniel P. Berrange" writes: >>> The qdict_flatten() method will take a dict whose elements are

Re: [Qemu-block] [Qemu-devel] [PATCH v14 00/21] QAPI/QOM work for non-scalar object properties

2016-10-21 Thread Markus Armbruster
"Daniel P. Berrange" writes: > An update of a series previously posted > > v1: https://lists.gnu.org/archive/html/qemu-devel/2016-02/msg04618.html > v2: https://lists.gnu.org/archive/html/qemu-devel/2016-03/msg01454.html > v3:

Re: [Qemu-block] [Qemu-devel] [PATCH v14 01/21] option: make parse_option_bool/number non-static

2016-10-21 Thread Markus Armbruster
Eric Blake writes: > On 10/21/2016 11:55 AM, Markus Armbruster wrote: > >> >> On first glance, this patch makes the boolean values recognized on the >> command line consistent regardless of which part of the code is used to >> recognize them, by extending the QemuOpts parser

Re: [Qemu-block] [Qemu-devel] [PATCH v14 01/21] option: make parse_option_bool/number non-static

2016-10-21 Thread Eric Blake
On 10/21/2016 11:55 AM, Markus Armbruster wrote: > > On first glance, this patch makes the boolean values recognized on the > command line consistent regardless of which part of the code is used to > recognize them, by extending the QemuOpts parser to accept the option > visitor's additional

Re: [Qemu-block] [Qemu-devel] [PATCH v14 01/21] option: make parse_option_bool/number non-static

2016-10-21 Thread Markus Armbruster
"Daniel P. Berrange" writes: > The opts-visitor.c opts_type_bool() method has code for > parsing a string to set a bool value, as does the > qemu-option.c parse_option_bool() method, except it > handles fewer cases. > > To enable consistency across the codebase, extend >

Re: [Qemu-block] [PATCH 0/5] jobs: fix transactional race condition

2016-10-21 Thread John Snow
On 10/20/2016 06:20 PM, John Snow wrote: Requires: [Qemu-devel] [PATCH 0/7] blockjobs: preliminary refactoring work, Pt 1 There are a few problems with transactional job completion right now. First, if jobs complete so quickly they complete before remaining jobs get a chance to join the

Re: [Qemu-block] [PATCH v2] ssh: switch from libssh2 to libssh

2016-10-21 Thread Richard W.M. Jones
On Fri, Oct 21, 2016 at 05:30:39PM +0200, Pino Toscano wrote: > On Friday, 21 October 2016 13:02:21 CEST Richard W.M. Jones wrote: > > On Fri, Oct 21, 2016 at 01:16:11PM +0200, Pino Toscano wrote: > > > Rewrite the implementation of the ssh block driver to use libssh instead > > > of libssh2. The

Re: [Qemu-block] [PATCH 12/22] qcow2-bitmap: add IN_USE flag

2016-10-21 Thread Vladimir Sementsov-Ogievskiy
07.10.2016 22:44, Max Reitz пишет: On 30.09.2016 12:53, Vladimir Sementsov-Ogievskiy wrote: This flag means that the bitmap is now in use by the software or was not successfully saved. In any way, with this flag set the bitmap data must be considered inconsistent and should not be loaded. With

Re: [Qemu-block] [PATCH v2] ssh: switch from libssh2 to libssh

2016-10-21 Thread Pino Toscano
On Friday, 21 October 2016 13:02:21 CEST Richard W.M. Jones wrote: > On Fri, Oct 21, 2016 at 01:16:11PM +0200, Pino Toscano wrote: > > Rewrite the implementation of the ssh block driver to use libssh instead > > of libssh2. The libssh library has various advantages over libssh2: > > - easier API

Re: [Qemu-block] [Qemu-devel] [PATCH v2] ssh: switch from libssh2 to libssh

2016-10-21 Thread Pino Toscano
On Friday, 21 October 2016 12:25:40 CEST Daniel P. Berrange wrote: > On Fri, Oct 21, 2016 at 01:16:11PM +0200, Pino Toscano wrote: > > Rewrite the implementation of the ssh block driver to use libssh instead > > of libssh2. The libssh library has various advantages over libssh2: > > - easier API

Re: [Qemu-block] [Qemu-devel] [PATCH 3/9] block: Remove bdrv_aio_pdiscard()

2016-10-21 Thread Eric Blake
On 10/21/2016 05:59 AM, Kevin Wolf wrote: > Am 20.10.2016 um 19:32 hat Eric Blake geschrieben: >> On 10/20/2016 08:46 AM, Kevin Wolf wrote: >>> It is unused now. >>> >>> Signed-off-by: Kevin Wolf >>> --- >>> block/io.c| 29 - >>>

Re: [Qemu-block] [Qemu-devel] Assertion failure on qcow2 disk with cluster_size != 64k

2016-10-21 Thread Ed Swierk
On Thu, Oct 20, 2016 at 6:38 PM, Eric Blake wrote: > On 10/20/2016 07:24 PM, Ed Swierk wrote: >> Changing max_transfer in the normal write case to >> MIN_NON_ZERO(alignment, MAX_WRITE_ZEROES_BOUNCE_BUFFER) appears to fix >> the problem, but I don't pretend to understand all the

Re: [Qemu-block] [PATCH v2] ssh: switch from libssh2 to libssh

2016-10-21 Thread Richard W.M. Jones
On Fri, Oct 21, 2016 at 01:16:11PM +0200, Pino Toscano wrote: > Rewrite the implementation of the ssh block driver to use libssh instead > of libssh2. The libssh library has various advantages over libssh2: > - easier API for authentication (for example for using ssh-agent) > - easier API for

Re: [Qemu-block] [PATCH 07/22] qcow2-bitmap: introduce auto-loading bitmaps

2016-10-21 Thread Vladimir Sementsov-Ogievskiy
07.10.2016 22:25, Max Reitz пишет: On 30.09.2016 12:53, Vladimir Sementsov-Ogievskiy wrote: Auto loading bitmaps are bitmaps in Qcow2, with AUTO flag set. They are loaded at image open and becomes BdrvDirtyBitmap's for corresponding drive. These bitmaps are deleted from Qcow2 image after

Re: [Qemu-block] [Qemu-devel] [PATCH v14 09/21] qapi: permit auto-creating single element lists

2016-10-21 Thread Markus Armbruster
"Daniel P. Berrange" writes: > On Wed, Oct 12, 2016 at 11:18:21AM +0200, Markus Armbruster wrote: >> "Daniel P. Berrange" writes: >> >> > When converting QemuOpts to a QObject, there is no information >> > about compound types available, >> >> Yes,

Re: [Qemu-block] [Qemu-devel] [PATCH v14 12/21] option: allow qemu_opts_to_qdict to merge repeated options

2016-10-21 Thread Markus Armbruster
"Daniel P. Berrange" writes: > On Thu, Oct 13, 2016 at 10:31:37AM +0200, Markus Armbruster wrote: >> "Daniel P. Berrange" writes: >> >> > If given an option string such as >> > >> > size=1024,nodes=10,nodes=4-5,nodes=1-2,policy=bind >> > >> > the

Re: [Qemu-block] [Qemu-devel] [PATCH v2] ssh: switch from libssh2 to libssh

2016-10-21 Thread Daniel P. Berrange
On Fri, Oct 21, 2016 at 01:16:11PM +0200, Pino Toscano wrote: > Rewrite the implementation of the ssh block driver to use libssh instead > of libssh2. The libssh library has various advantages over libssh2: > - easier API for authentication (for example for using ssh-agent) > - easier API for

[Qemu-block] [PATCH v2] ssh: switch from libssh2 to libssh

2016-10-21 Thread Pino Toscano
Rewrite the implementation of the ssh block driver to use libssh instead of libssh2. The libssh library has various advantages over libssh2: - easier API for authentication (for example for using ssh-agent) - easier API for known_hosts handling - supports newer types of keys in known_hosts

Re: [Qemu-block] [Qemu-devel] [PATCH v14 12/21] option: allow qemu_opts_to_qdict to merge repeated options

2016-10-21 Thread Daniel P. Berrange
On Fri, Oct 21, 2016 at 01:09:07PM +0200, Markus Armbruster wrote: > "Daniel P. Berrange" writes: > > > On Wed, Oct 12, 2016 at 07:46:00PM +0200, Markus Armbruster wrote: > >> "Daniel P. Berrange" writes: > >> > >> > If given an option string such as >

Re: [Qemu-block] [Qemu-devel] [PATCH v14 12/21] option: allow qemu_opts_to_qdict to merge repeated options

2016-10-21 Thread Markus Armbruster
"Daniel P. Berrange" writes: > On Wed, Oct 12, 2016 at 07:46:00PM +0200, Markus Armbruster wrote: >> "Daniel P. Berrange" writes: >> >> > If given an option string such as >> > >> > size=1024,nodes=10,nodes=4-5,nodes=1-2,policy=bind >> > >> > the

Re: [Qemu-block] [Qemu-devel] [PATCH 3/9] block: Remove bdrv_aio_pdiscard()

2016-10-21 Thread Kevin Wolf
Am 20.10.2016 um 19:32 hat Eric Blake geschrieben: > On 10/20/2016 08:46 AM, Kevin Wolf wrote: > > It is unused now. > > > > Signed-off-by: Kevin Wolf > > --- > > block/io.c| 29 - > > block/trace-events| 1 - > >

Re: [Qemu-block] [Qemu-devel] [PATCH v14 11/21] qapi: add integer range support for QObjectInputVisitor

2016-10-21 Thread Markus Armbruster
"Daniel P. Berrange" writes: > On Wed, Oct 12, 2016 at 05:50:41PM +0200, Markus Armbruster wrote: >> "Daniel P. Berrange" writes: >> >> > The traditional CLI arg syntax allows two ways to specify >> > integer lists, either one value per key, or a range

Re: [Qemu-block] [Qemu-devel] [PATCH v14 03/21] qapi: add trace events for visitor

2016-10-21 Thread Markus Armbruster
"Daniel P. Berrange" writes: > On Fri, Oct 07, 2016 at 03:59:07PM +0200, Markus Armbruster wrote: >> "Daniel P. Berrange" writes: >> >> > Allow tracing of the operation of visitors >> > >> > Signed-off-by: Daniel P. Berrange >> >

Re: [Qemu-block] [Qemu-devel] [PATCH v14 02/21] qdict: implement a qdict_crumple method for un-flattening a dict

2016-10-21 Thread Markus Armbruster
"Daniel P. Berrange" writes: > On Tue, Oct 18, 2016 at 04:32:13PM +0200, Markus Armbruster wrote: >> "Daniel P. Berrange" writes: >> >> > The qdict_flatten() method will take a dict whose elements are >> > further nested dicts/lists and flatten them by

Re: [Qemu-block] [Qemu-devel] [PATCH v14 00/19] QAPI/QOM work for non-scalar object properties

2016-10-21 Thread Daniel P. Berrange
On Fri, Oct 21, 2016 at 11:35:10AM +0200, Markus Armbruster wrote: > Uh, replied to the wrong v14... The one I reviewed is actually v15, > Message-Id: <1475246744-29302-1-git-send-email-berra...@redhat.com> > http://lists.gnu.org/archive/html/qemu-devel/2016-09/msg08238.html Sorry, my bad for

Re: [Qemu-block] [Qemu-devel] [PATCH v14 00/19] QAPI/QOM work for non-scalar object properties

2016-10-21 Thread Markus Armbruster
Uh, replied to the wrong v14... The one I reviewed is actually v15, Message-Id: <1475246744-29302-1-git-send-email-berra...@redhat.com> http://lists.gnu.org/archive/html/qemu-devel/2016-09/msg08238.html Markus Armbruster writes: > I've warmed quite a bit to this series while