Re: [Qemu-block] [Qemu-devel] [PATCH 0/3] iotests: cure s390x failures by switching to ccw

2017-09-06 Thread Cornelia Huck
On Wed, 6 Sep 2017 14:57:48 +0800 QingFeng Hao wrote: > 在 2017/9/5 23:16, Cornelia Huck 写道: > > Recent changes in s390x made pci support dependant on the zpci cpu > > feature, which is not provided on all models (and not on by default). > > This means we cannot instatiate pci devices on a standar

Re: [Qemu-block] [Qemu-devel] [PATCH 2/3] iotests: use -ccw on s390x for 051

2017-09-06 Thread QingFeng Hao
在 2017/9/5 23:16, Cornelia Huck 写道: The default cpu model on s390x does not provide zPCI, which is not yet wired up on tcg. Moreover, virtio-ccw is the standard on s390x, so use the -ccw instead of the -pci versions of virtio devices on s390x. Provide an output file for s390x. Signed-off-by:

Re: [Qemu-block] [Qemu-devel] [PATCH 2/3] iotests: use -ccw on s390x for 051

2017-09-06 Thread Cornelia Huck
On Wed, 6 Sep 2017 15:19:01 +0800 QingFeng Hao wrote: > 在 2017/9/5 23:16, Cornelia Huck 写道: > > The default cpu model on s390x does not provide zPCI, which is > > not yet wired up on tcg. Moreover, virtio-ccw is the standard > > on s390x, so use the -ccw instead of the -pci versions of virtio > >

Re: [Qemu-block] [Qemu-devel] [PATCH 0/3] iotests: cure s390x failures by switching to ccw

2017-09-06 Thread Cornelia Huck
On Wed, 6 Sep 2017 14:57:48 +0800 QingFeng Hao wrote: > 在 2017/9/5 23:16, Cornelia Huck 写道: > > Recent changes in s390x made pci support dependant on the zpci cpu > > feature, which is not provided on all models (and not on by default). > > This means we cannot instatiate pci devices on a standar

Re: [Qemu-block] [Qemu-devel] [PATCH] qcow2: move qcow2_store_persistent_dirty_bitmaps() before cache flushing

2017-09-06 Thread Pavel Butsykin
On 05.09.2017 22:30, Eric Blake wrote: On 09/04/2017 05:18 AM, Pavel Butsykin wrote: After calling qcow2_inactivate(), all qcow2 caches must be flushed, but this may not happen, because the last call qcow2_store_persistent_dirty_bitmaps() can lead to marking l2/refcont cache as dirty. Let's mov

Re: [Qemu-block] [Qemu-devel] [PATCH v9 6/6] qemu-iotests: add 184 for throttle filter driver

2017-09-06 Thread Manos Pitsidianakis
On Tue, Sep 05, 2017 at 04:13:39PM -0500, Eric Blake wrote: On 09/05/2017 02:06 PM, Kevin Wolf wrote: Am 05.09.2017 um 18:16 hat Kevin Wolf geschrieben: Am 25.08.2017 um 15:20 hat Manos Pitsidianakis geschrieben: Reviewed-by: Alberto Garcia Signed-off-by: Manos Pitsidianakis Does this test

Re: [Qemu-block] [Qemu-devel] [PATCH v9 6/6] qemu-iotests: add 184 for throttle filter driver

2017-09-06 Thread Kevin Wolf
Am 06.09.2017 um 10:26 hat Manos Pitsidianakis geschrieben: > On Tue, Sep 05, 2017 at 04:13:39PM -0500, Eric Blake wrote: > > On 09/05/2017 02:06 PM, Kevin Wolf wrote: > > > Am 05.09.2017 um 18:16 hat Kevin Wolf geschrieben: > > > > Am 25.08.2017 um 15:20 hat Manos Pitsidianakis geschrieben: > > >

Re: [Qemu-block] [Qemu-devel] [PATCH 2/3] iotests: use -ccw on s390x for 051

2017-09-06 Thread QingFeng Hao
在 2017/9/6 15:32, Cornelia Huck 写道: On Wed, 6 Sep 2017 15:19:01 +0800 QingFeng Hao wrote: 在 2017/9/5 23:16, Cornelia Huck 写道: The default cpu model on s390x does not provide zPCI, which is not yet wired up on tcg. Moreover, virtio-ccw is the standard on s390x, so use the -ccw instead of the

Re: [Qemu-block] [PATCH 1/3] io: Yield rather than wait when already in coroutine

2017-09-06 Thread Daniel P. Berrange
On Tue, Sep 05, 2017 at 02:11:12PM -0500, Eric Blake wrote: > The new qio_channel_{read,write}{,v}_all functions are documented > as yielding until data is available. When used on a blocking > channel, this yield is done via qio_channel_wait() which spawns > a new coroutine under the hood (so it i

Re: [Qemu-block] [PATCH 2/3] io: Add new qio_channel_read{, v}_all_eof functions

2017-09-06 Thread Daniel P. Berrange
On Tue, Sep 05, 2017 at 02:11:13PM -0500, Eric Blake wrote: > Some callers want to distinguish between clean EOF (no bytes read) > vs. a short read (at least one byte read, but EOF encountered > before reaching the desired length), as it allows clients the > ability to do a graceful shutdown when a

Re: [Qemu-block] [PATCH 3/3] nbd: Use new qio_channel_*_all() functions

2017-09-06 Thread Daniel P. Berrange
On Tue, Sep 05, 2017 at 02:11:14PM -0500, Eric Blake wrote: > Rather than open-coding our own read/write-all functions, we > can make use of the recently-added qio code. It slightly > changes the error message in one of the iotests. > > Signed-off-by: Eric Blake > --- > include/block/nbd.h

Re: [Qemu-block] [Qemu-devel] query-block io-status display

2017-09-06 Thread Kevin Wolf
[ Cc: qemu-block ] Am 05.09.2017 um 06:59 hat Jack Schwartz geschrieben: > Hi Luiz, Markus and everyone. > > I am working on a qemu enhancement to display io-status in each query-block > command, not just those for devices which have werror and/or rerror set to > stop on error. > > I'd like to v

[Qemu-block] [PATCH v5] docs: add qemu-block-drivers(7) man page

2017-09-06 Thread Stefan Hajnoczi
Block driver documentation is available in qemu-doc.html. It would be convenient to have documentation for formats, protocols, and filter drivers in a man page. Extract the relevant part of qemu-doc.html into a new file called docs/qemu-block-drivers.texi. This file can also be built as a stand-

Re: [Qemu-block] [PATCH v5] docs: add qemu-block-drivers(7) man page

2017-09-06 Thread Kevin Wolf
Am 06.09.2017 um 13:03 hat Stefan Hajnoczi geschrieben: > Block driver documentation is available in qemu-doc.html. It would be > convenient to have documentation for formats, protocols, and filter > drivers in a man page. > > Extract the relevant part of qemu-doc.html into a new file called > do

Re: [Qemu-block] [Qemu-devel] [PATCH] qcow2: move qcow2_store_persistent_dirty_bitmaps() before cache flushing

2017-09-06 Thread Kevin Wolf
Am 06.09.2017 um 10:19 hat Pavel Butsykin geschrieben: > On 05.09.2017 22:30, Eric Blake wrote: > > On 09/04/2017 05:18 AM, Pavel Butsykin wrote: > > > After calling qcow2_inactivate(), all qcow2 caches must be flushed, but > > > this > > > may not happen, because the last call > > > qcow2_store_

Re: [Qemu-block] [PATCH v5] docs: add qemu-block-drivers(7) man page

2017-09-06 Thread Stefan Hajnoczi
On Wed, Sep 06, 2017 at 01:49:53PM +0200, Kevin Wolf wrote: > Am 06.09.2017 um 13:03 hat Stefan Hajnoczi geschrieben: > > Block driver documentation is available in qemu-doc.html. It would be > > convenient to have documentation for formats, protocols, and filter > > drivers in a man page. > > >

Re: [Qemu-block] [PATCH v2 0/3] Live block optional disable

2017-09-06 Thread Kevin Wolf
Am 30.08.2017 um 19:01 hat Jeff Cody geschrieben: > This series adds a configurable option to disable live block operations. > > The default is that live block operations are 'enabled'. Let me play dumb: Who would ever want to disable these? Is there a legitimate reason to do this except artifici

Re: [Qemu-block] [PATCH v2 2/3] block-jobs: Optionally unregister live block operations

2017-09-06 Thread Kevin Wolf
Am 30.08.2017 um 19:01 hat Jeff Cody geschrieben: > From: Jeffrey Cody > > If configured without live block operations enabled, unregister the > live block operation commands. > > Signed-off-by: Jeff Cody How sure are we that libvirt will like a qemu that advertises these commands in the schem

Re: [Qemu-block] Persistent bitmaps for non-qcow2 formats

2017-09-06 Thread Stefan Hajnoczi
On Tue, Sep 05, 2017 at 01:46:24PM +0200, Kevin Wolf wrote: > Am 22.08.2017 um 21:07 hat John Snow geschrieben: > > Well, we knew we'd want this sooner or later. I've got some pings > > downstream over whether or not we support persistent bitmaps for > > non-qcow2 formats. > > > > Currently: no, w

Re: [Qemu-block] [PATCH v10 0/6] fsdev: qmp interface for io throttling

2017-09-06 Thread Pradeep Jagadeesh
On 9/5/2017 11:19 PM, Eric Blake wrote: On 09/04/2017 11:07 AM, Pradeep Jagadeesh wrote: These patches provide the qmp interface, to query the io throttle status of the all fsdev devices that are present in a vm. also, it provides an interface to set the io throttle parameters of a fsdev to a re

Re: [Qemu-block] [Qemu-devel] [PATCH 0/3] iotests: cure s390x failures by switching to ccw

2017-09-06 Thread Yi Min Zhao
在 2017/9/6 下午3:59, Cornelia Huck 写道: On Wed, 6 Sep 2017 14:57:48 +0800 QingFeng Hao wrote: 在 2017/9/5 23:16, Cornelia Huck 写道: Recent changes in s390x made pci support dependant on the zpci cpu feature, which is not provided on all models (and not on by default). This means we cannot instat

[Qemu-block] [PULL 05/14] qcow: Change signature of get_cluster_offset()

2017-09-06 Thread Kevin Wolf
From: Eric Blake The old signature has an ambiguous meaning for a return of 0: either no allocation was requested or necessary, or an error occurred (but any errno associated with the error is lost to the caller, which then has to assume EIO). Better is to follow the example of qcow2, by changin

[Qemu-block] [PULL 00/14] Block layer patches

2017-09-06 Thread Kevin Wolf
The following changes since commit 98bfaac788be0ca63d7d010c8d4ba100ff1d8278: Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2017-09-01-v3' into staging (2017-09-04 13:28:09 +0100) are available in the git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you

[Qemu-block] [PULL 04/14] block: add default implementations for bdrv_co_get_block_status()

2017-09-06 Thread Kevin Wolf
From: Manos Pitsidianakis bdrv_co_get_block_status_from_file() and bdrv_co_get_block_status_from_backing() set *file to bs->file and bs->backing respectively, so that bdrv_co_get_block_status() can recurse to them. Future block drivers won't have to duplicate code to implement this. Reviewed-by:

[Qemu-block] [PULL 02/14] block: remove unused bdrv_media_changed

2017-09-06 Thread Kevin Wolf
From: Manos Pitsidianakis This function is not used anywhere, so remove it. Markus Armbruster adds: The i82078 floppy device model used to call bdrv_media_changed() to implement its media change bit when backed by a host floppy. This went away in 21fcf36 "fdc: simplify media change handling". P

[Qemu-block] [PULL 03/14] block: remove bdrv_truncate callback in blkdebug

2017-09-06 Thread Kevin Wolf
From: Manos Pitsidianakis Now that bdrv_truncate is passed to bs->file by default, remove the callback from block/blkdebug.c and set is_filter to true. is_filter also gives access to other callbacks that are forwarded automatically to bs->file for filters. Reviewed-by: Eric Blake Reviewed-by: S

[Qemu-block] [PULL 01/14] block: pass bdrv_* methods to bs->file by default in block filters

2017-09-06 Thread Kevin Wolf
From: Manos Pitsidianakis The following functions fail if bs->drv is a filter and does not implement them: bdrv_probe_blocksizes bdrv_probe_geometry bdrv_truncate bdrv_has_zero_init bdrv_get_info Instead, the call should be passed to bs->file if it exists, to allow filter drivers to support tho

[Qemu-block] [PULL 07/14] block: document semantics of bdrv_co_preadv|pwritev

2017-09-06 Thread Kevin Wolf
From: "Daniel P. Berrange" Reviewed-by: Stefan Hajnoczi Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrange Signed-off-by: Kevin Wolf --- include/block/block_int.h | 31 +++ 1 file changed, 31 insertions(+) diff --git a/include/block/block_int.h b/include/b

[Qemu-block] [PULL 06/14] qcow: Check failure of bdrv_getlength() and bdrv_truncate()

2017-09-06 Thread Kevin Wolf
From: Eric Blake Omitting the check for whether bdrv_getlength() and bdrv_truncate() failed meant that it was theoretically possible to return an incorrect offset to the caller. More likely, conditions for either of these functions to fail would also cause one of our other calls (such as bdrv_pr

[Qemu-block] [PULL 10/14] block: tidy ThrottleGroupMember initializations

2017-09-06 Thread Kevin Wolf
From: Manos Pitsidianakis Move the CoMutex and CoQueue inits inside throttle_group_register_tgm() which is called whenever a ThrottleGroupMember is initialized. There's no need for them to be separate. Reviewed-by: Alberto Garcia Reviewed-by: Stefan Hajnoczi Signed-off-by: Manos Pitsidianakis

[Qemu-block] [PULL 12/14] block: add throttle block filter driver

2017-09-06 Thread Kevin Wolf
From: Manos Pitsidianakis block/throttle.c uses existing I/O throttle infrastructure inside a block filter driver. I/O operations are intercepted in the filter's read/write coroutines, and referred to block/throttle-groups.c The driver can be used with the syntax -drive driver=throttle,file.file

[Qemu-block] [PULL 09/14] block: add aio_context field in ThrottleGroupMember

2017-09-06 Thread Kevin Wolf
From: Manos Pitsidianakis timer_cb() needs to know about the current Aio context of the throttle request that is woken up. In order to make ThrottleGroupMember backend agnostic, this information is stored in an aio_context field instead of accessing it from BlockBackend. Reviewed-by: Alberto Gar

[Qemu-block] [PULL 11/14] block: convert ThrottleGroup to object with QOM

2017-09-06 Thread Kevin Wolf
From: Manos Pitsidianakis ThrottleGroup is converted to an object. This will allow the future throttle block filter drive easy creation and configuration of throttle groups in QMP and cli. A new QAPI struct, ThrottleLimits, is introduced to provide a shared struct for all throttle configuration

[Qemu-block] [PULL 08/14] block: move ThrottleGroup membership to ThrottleGroupMember

2017-09-06 Thread Kevin Wolf
From: Manos Pitsidianakis This commit eliminates the 1:1 relationship between BlockBackend and throttle group state. Users will be able to create multiple throttle nodes, each with its own throttle group state, in the future. The throttle group state cannot be per-BlockBackend anymore, it must

[Qemu-block] [PULL 13/14] qemu-iotests: add 184 for throttle filter driver

2017-09-06 Thread Kevin Wolf
From: Manos Pitsidianakis Reviewed-by: Alberto Garcia Signed-off-by: Manos Pitsidianakis Reviewed-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- tests/qemu-iotests/184 | 205 ++ tests/qemu-iotests/184.out | 302 +

[Qemu-block] [PULL 14/14] qcow2: move qcow2_store_persistent_dirty_bitmaps() before cache flushing

2017-09-06 Thread Kevin Wolf
From: Pavel Butsykin After calling qcow2_inactivate(), all qcow2 caches must be flushed, but this may not happen, because the last call qcow2_store_persistent_dirty_bitmaps() can lead to marking l2/refcont cache as dirty. Let's move qcow2_store_persistent_dirty_bitmaps() before the caсhe flushin

Re: [Qemu-block] [Qemu-devel] [PATCH 1/1] block: add block device shared field

2017-09-06 Thread Stefan Hajnoczi
On Tue, Sep 05, 2017 at 11:10:55AM -0400, Brian Steffens wrote: > > Have you considered extending the 'migrate' command with a list of > > drives instead? > > That was my original plan but I thought having information on whether a > device is shared or not could potentially be useful to other syst

Re: [Qemu-block] [Qemu-devel] [PATCH 1/3] io: Yield rather than wait when already in coroutine

2017-09-06 Thread Paolo Bonzini
Il 06 set 2017 10:51 AM, "Daniel P. Berrange" ha scritto: On Tue, Sep 05, 2017 at 02:11:12PM -0500, Eric Blake wrote: > The new qio_channel_{read,write}{,v}_all functions are documented > as yielding until data is available. When used on a blocking > channel, this yield is done via qio_channel_w

Re: [Qemu-block] [PATCH v2 2/3] block-jobs: Optionally unregister live block operations

2017-09-06 Thread Eduardo Habkost
On Wed, Sep 06, 2017 at 03:00:41PM +0200, Kevin Wolf wrote: > Am 30.08.2017 um 19:01 hat Jeff Cody geschrieben: > > From: Jeffrey Cody > > > > If configured without live block operations enabled, unregister the > > live block operation commands. > > > > Signed-off-by: Jeff Cody > > How sure ar

Re: [Qemu-block] [Qemu-devel] [PATCH 0/3] nbd: Use common read/write-all qio functions

2017-09-06 Thread Eric Blake
On 09/05/2017 02:11 PM, Eric Blake wrote: > Now that Daniel just added convenience qio channel looping functions, > we might as well use it in NBD instead of open-coding our own. In > doing so, fix a couple of short-falls noticed in the qio code. > > If Dan is happy with this, I can take the seri

Re: [Qemu-block] [PATCH 1/3] io: Yield rather than wait when already in coroutine

2017-09-06 Thread Eric Blake
On 09/06/2017 03:50 AM, Daniel P. Berrange wrote: > On Tue, Sep 05, 2017 at 02:11:12PM -0500, Eric Blake wrote: >> The new qio_channel_{read,write}{,v}_all functions are documented >> as yielding until data is available. When used on a blocking >> channel, this yield is done via qio_channel_wait()

[Qemu-block] [PULL 1/5] iotests: rewrite 192 to use _launch_qemu to fix LUKS support

2017-09-06 Thread Eric Blake
From: "Daniel P. Berrange" The LUKS driver requires extra args to QEMU to setup passwords. The _launch_qemu function takes care of this, so convert the test to use this function and use correct -drive syntax Signed-off-by: Daniel P. Berrange Message-Id: <20170901105434.3288-2-berra...@redhat.co

[Qemu-block] [PULL 2/5] iotests: blacklist 194 with the luks driver

2017-09-06 Thread Eric Blake
From: "Daniel P. Berrange" The 194 test has a lot of code that assumes a simple image file. Rewriting this to work with luks is possible, but non-trivial, so blacklist the luks format for now. Signed-off-by: Daniel P. Berrange Message-Id: <20170901105434.3288-3-berra...@redhat.com> Reviewed-by:

[Qemu-block] [PULL 5/5] nbd: Use new qio_channel_*_all() functions

2017-09-06 Thread Eric Blake
Rather than open-coding our own read/write-all functions, we can make use of the recently-added qio code. It slightly changes the error message in one of the iotests. Signed-off-by: Eric Blake Message-Id: <20170905191114.5959-4-ebl...@redhat.com> Reviewed-by: Daniel P. Berrange --- include/blo

Re: [Qemu-block] [Qemu-devel] [RFC PATCH 00/56] qapi: Use 'size' for byte counts & offsets

2017-09-06 Thread Kevin Wolf
Am 07.08.2017 um 16:45 hat Markus Armbruster geschrieben: > Byte sizes, offsets and the like should use QAPI type 'size' > (uint64_t). This rule is more honored in the breach than in the > observance. Fix the obvious offenders. > > The series is RFC for at least two reasons: > > 1. It's only li

Re: [Qemu-block] [Qemu-devel] [PATCH v2 2/3] block-jobs: Optionally unregister live block operations

2017-09-06 Thread Eric Blake
On 09/06/2017 10:02 AM, Eduardo Habkost wrote: > On Wed, Sep 06, 2017 at 03:00:41PM +0200, Kevin Wolf wrote: >> Am 30.08.2017 um 19:01 hat Jeff Cody geschrieben: >>> From: Jeffrey Cody >>> >>> If configured without live block operations enabled, unregister the >>> live block operation commands. >>

Re: [Qemu-block] [Qemu-devel] [RFC PATCH 00/56] qapi: Use 'size' for byte counts & offsets

2017-09-06 Thread Markus Armbruster
Kevin Wolf writes: > Am 07.08.2017 um 16:45 hat Markus Armbruster geschrieben: >> Byte sizes, offsets and the like should use QAPI type 'size' >> (uint64_t). This rule is more honored in the breach than in the >> observance. Fix the obvious offenders. >> >> The series is RFC for at least two r

Re: [Qemu-block] [Qemu-devel] [PATCH v6 12/29] libqos: Track QTestState with QPCIBus

2017-09-06 Thread Eric Blake
On 09/01/2017 02:20 PM, Philippe Mathieu-Daudé wrote: > Hi Eric, > > On 09/01/2017 03:03 PM, Eric Blake wrote: >> When initializing a QPCIBus, track which QTestState the bus is >> associated with (so that a later patch can then explicitly use >> that test state for all communication on the bus, ra

Re: [Qemu-block] [Qemu-devel] [PATCH v6 12/29] libqos: Track QTestState with QPCIBus

2017-09-06 Thread Eric Blake
On 09/05/2017 04:36 AM, Thomas Huth wrote: > On 01.09.2017 20:03, Eric Blake wrote: >> When initializing a QPCIBus, track which QTestState the bus is >> associated with (so that a later patch can then explicitly use >> that test state for all communication on the bus, rather than >> blindly relying

Re: [Qemu-block] [Qemu-devel] [PATCH v6 14/29] libqos: Use explicit QTestState for fw_cfg operations

2017-09-06 Thread Eric Blake
On 09/05/2017 06:03 AM, Thomas Huth wrote: > On 05.09.2017 12:12, Thomas Huth wrote: >> On 01.09.2017 20:03, Eric Blake wrote: >>> Drop one more client of global_qtest by teaching all fw_cfg test >>> functionality (invoked through alloc-pc) to pass in an explicit >>> QTestState, adjusting all calle

Re: [Qemu-block] [Qemu-devel] [PATCH v6 14/29] libqos: Use explicit QTestState for fw_cfg operations

2017-09-06 Thread Eric Blake
On 09/06/2017 04:10 PM, Eric Blake wrote: >> I'm not a fan of including header files from other header files, so >> changing the include order in the .c files sounds like the better >> solution to me. > > Eww. I like headers to be self-contained. Other than stuff we get from > osdep.h (which we k

Re: [Qemu-block] [Qemu-devel] [PATCH v6 16/29] libqos: Use explicit QTestState for virtio operations

2017-09-06 Thread Eric Blake
On 09/05/2017 07:43 AM, Paolo Bonzini wrote: >> typedef struct QVirtioDevice { >> const QVirtioBus *bus; >> +QTestState *qts; >> /* Device type */ >> uint16_t device_type; >> } QVirtioDevice; >> @@ -35,12 +36,14 @@ typedef struct QVirtQueue { >> uint16_t last_used_idx; >>

Re: [Qemu-block] [Qemu-devel] [PATCH v6 29/29] libqtest: Rename qtest_init() to qtest_start()

2017-09-06 Thread Eric Blake
On 09/05/2017 08:10 AM, Thomas Huth wrote: > On 01.09.2017 20:03, Eric Blake wrote: >> We already have another qtest_init() in the tree, for the >> top-level qtest.c device; having two functions with different >> signatures is confusing. Rename the libqtest version to >> qtest_start() to eliminate

Re: [Qemu-block] [Qemu-devel] [PATCH v6 12/29] libqos: Track QTestState with QPCIBus

2017-09-06 Thread Thomas Huth
On 06.09.2017 23:00, Eric Blake wrote: > On 09/05/2017 04:36 AM, Thomas Huth wrote: >> On 01.09.2017 20:03, Eric Blake wrote: >>> When initializing a QPCIBus, track which QTestState the bus is >>> associated with (so that a later patch can then explicitly use >>> that test state for all communicati