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

2017-09-05 Thread Fam Zheng
On Tue, 09/05 10:56, Stefan Hajnoczi wrote: > On Fri, Sep 01, 2017 at 08:10:54PM +, Brian Steffens wrote: > > This adds a boolean option called 'shared' to block devices. It defaults > > to off/false. When enabled for a particular block device, the 'shared' > > option > > causes the block

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

2017-09-05 Thread Eric Blake
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 move

Re: [Qemu-block] [PATCH] qemu-iotests: Make test 192 use QMP; convert it to Python

2017-09-05 Thread Eric Blake
On 09/04/2017 08:28 AM, Kashyap Chamarthy wrote: > On Mon, Sep 04, 2017 at 08:55:23PM +0800, Fam Zheng wrote: >> Hi Kashyap, >> >> On Mon, 09/04 13:16, Kashyap Chamarthy wrote: >>> The test 192 ("Test NBD export with '-incoming' (non-shared >>> storage migration use case from libvirt")) is

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

2017-09-05 Thread Eric Blake
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] [PATCH v10 0/6] fsdev: qmp interface for io throttling

2017-09-05 Thread Eric Blake
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 required value. some of the patches

Re: [Qemu-block] [PATCH] block: Cleanup BMDS in bdrv_close_all

2017-09-05 Thread Kevin Wolf
Am 30.08.2017 um 12:06 hat Fam Zheng geschrieben: > This fixes the assertion due to op blockers added by BMDS: > > block.c:3248: bdrv_delete: Assertion `bdrv_op_blocker_is_empty(bs)' failed. > > Reproducer: simply start block migration and quit QEMU before it ends. > > Cc:

Re: [Qemu-block] [Qemu-devel] [PATCH] block: Cleanup BMDS in bdrv_close_all

2017-09-05 Thread Fam Zheng
On Tue, 09/05 10:44, Kevin Wolf wrote: > Am 30.08.2017 um 12:06 hat Fam Zheng geschrieben: > > This fixes the assertion due to op blockers added by BMDS: > > > > block.c:3248: bdrv_delete: Assertion `bdrv_op_blocker_is_empty(bs)' failed. > > > > Reproducer: simply start block migration and quit

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

2017-09-05 Thread Kevin Wolf
Am 04.09.2017 um 18:26 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 >

Re: [Qemu-block] [PATCH v3 4/7] block: remove legacy I/O throttling

2017-09-05 Thread Stefan Hajnoczi
On Fri, Aug 25, 2017 at 04:23:29PM +0300, Manos Pitsidianakis wrote: > void blk_io_limits_disable(BlockBackend *blk) > { > -assert(blk->public.throttle_group_member.throttle_state); > -bdrv_drained_begin(blk_bs(blk)); > -throttle_group_unregister_tgm(>public.throttle_group_member); >

[Qemu-block] [PATCH 1/3] iotests: use -ccw on s390x for 040, 139, and 182

2017-09-05 Thread 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. Signed-off-by: Cornelia Huck --- tests/qemu-iotests/040 | 6 +-

[Qemu-block] [PATCH 3/3] iotests: use -ccw on s390x for 067

2017-09-05 Thread 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: Cornelia Huck ---

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

2017-09-05 Thread 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: Cornelia Huck ---

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

2017-09-05 Thread 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 standard qemu invocation for s390x. Moreover, the zpci instructions are not even wired up for tcg yet, so

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

2017-09-05 Thread Kevin Wolf
Am 25.08.2017 um 15:20 hat Manos Pitsidianakis geschrieben: > Reviewed-by: Alberto Garcia > Signed-off-by: Manos Pitsidianakis Does this test actually (still) pass for you? I can't see that it's related to any recent change in master, but this is the diff

Re: [Qemu-block] [PATCH v9 4/6] block: convert ThrottleGroup to object with QOM

2017-09-05 Thread Kevin Wolf
Am 25.08.2017 um 15:20 hat Manos Pitsidianakis geschrieben: > 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

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

2017-09-05 Thread Brian Steffens
Thanks for taking a look at the patch and fixing the missing CC addresses! > 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

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

2017-09-05 Thread Kevin Wolf
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 actually (still) pass for you? I can't see that it's

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

2017-09-05 Thread Eric Blake
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 server shuts down at defined safe points in the protocol, rather

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

2017-09-05 Thread Eric Blake
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 is the new entry point that yields as needed); but if we are already

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

2017-09-05 Thread Eric Blake
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 series through the NBD queue. [The diffstat is

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

2017-09-05 Thread Fam Zheng
On Tue, 09/05 15:27, Kevin Wolf wrote: > Am 05.09.2017 um 15:18 hat Fam Zheng geschrieben: > > On Tue, 09/05 15:01, Kevin Wolf wrote: > > > Am 28.08.2017 um 04:57 hat Fam Zheng geschrieben: > > > > On Fri, 08/25 15:44, Max Reitz wrote: > > > > > Well, OK. The main argument against supporting

Re: [Qemu-block] [PATCH v9 4/6] block: convert ThrottleGroup to object with QOM

2017-09-05 Thread Stefan Hajnoczi
On Fri, Aug 25, 2017 at 04:20:26PM +0300, Manos Pitsidianakis wrote: > 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

Re: [Qemu-block] [PATCH v9 5/6] block: add throttle block filter driver

2017-09-05 Thread Stefan Hajnoczi
On Fri, Aug 25, 2017 at 04:20:27PM +0300, Manos Pitsidianakis wrote: > +static int throttle_configure_tgm(BlockDriverState *bs, > + ThrottleGroupMember *tgm, > + QDict *options, Error **errp) > +{ > +int ret; > +const char

Re: [Qemu-block] [PATCH v9 0/6] add throttle block driver filter

2017-09-05 Thread Stefan Hajnoczi
On Fri, Aug 25, 2017 at 04:20:22PM +0300, Manos Pitsidianakis wrote: > This series adds a throttle block driver filter. Currently throttling is done > at the BlockBackend level. Using block driver interfaces we can move the > throttling to any point in the BDS graph using a throttle node which

Re: [Qemu-block] [PATCH v2 2/4] block: use BDRV_SECTOR_SIZE in crypto driver

2017-09-05 Thread Kevin Wolf
Am 31.08.2017 um 13:05 hat Daniel P. Berrange geschrieben: > Signed-off-by: Daniel P. Berrange > --- > block/crypto.c | 32 > 1 file changed, 16 insertions(+), 16 deletions(-) I'm actually not sure about this one. Anything that is left after

Re: [Qemu-block] [PATCH v4] block: document semantics of bdrv_co_preadv|pwritev

2017-09-05 Thread Kevin Wolf
Am 31.08.2017 um 12:54 hat Daniel P. Berrange geschrieben: > Reviewed-by: Stefan Hajnoczi > Reviewed-by: Eric Blake > Signed-off-by: Daniel P. Berrange Thanks, applied to the block branch. Kevin

Re: [Qemu-block] [PATCH v2 2/4] block: use BDRV_SECTOR_SIZE in crypto driver

2017-09-05 Thread Daniel P. Berrange
On Tue, Sep 05, 2017 at 11:52:15AM +0200, Kevin Wolf wrote: > Am 31.08.2017 um 13:05 hat Daniel P. Berrange geschrieben: > > Signed-off-by: Daniel P. Berrange > > --- > > block/crypto.c | 32 > > 1 file changed, 16 insertions(+), 16

Re: [Qemu-block] [PATCH v4] block: document semantics of bdrv_co_preadv|pwritev

2017-09-05 Thread Stefan Hajnoczi
On Thu, Aug 31, 2017 at 11:54:56AM +0100, Daniel P. Berrange wrote: > Reviewed-by: Stefan Hajnoczi > Reviewed-by: Eric Blake > Signed-off-by: Daniel P. Berrange > --- > > Changed in v4: > > - Fix typo in commit message > >

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

2017-09-05 Thread Thomas Huth
On 01.09.2017 20:03, Eric Blake wrote: > Drop one more client of global_qtest by teaching all virtio test > functionality to pass in an explicit QTestState in constructors, > where it is then reused for later access. Adjust all callers. > This gets us one step closer to eliminating implicit use

Re: [Qemu-block] [Qemu-devel] [PATCH v6 17/29] ahci-test: Drop dependence on global_qtest

2017-09-05 Thread Thomas Huth
On 01.09.2017 20:03, Eric Blake wrote: > Managing parallel connections to two different monitors via > the implicit global_qtest makes it hard to copy-and-paste code > to tests that are not aware of the implicit state; the > management of global_qtest is even harder to follow because > it was

Re: [Qemu-block] [PATCH v2 0/7] Refactor DMG driver to have chunk size independence

2017-09-05 Thread Stefan Hajnoczi
On Wed, Aug 30, 2017 at 06:32:52PM +0530, Ashijeet Acharya wrote: > On Tue, Aug 29, 2017 at 8:55 PM, Stefan Hajnoczi wrote: > > > On Sun, Aug 20, 2017 at 1:47 PM, Ashijeet Acharya > > wrote: > > > On Fri, May 5, 2017 at 7:29 PM, Stefan Hajnoczi

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

2017-09-05 Thread Kevin Wolf
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, we don't. I was going to write some things about r/w backing file, and

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

2017-09-05 Thread Stefan Hajnoczi
On Tue, Sep 05, 2017 at 11:03:03AM +0200, Kevin Wolf wrote: > Am 04.09.2017 um 18:26 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] [Qemu-devel] [PATCH 1/2] iotests: rewrite 192 to use _launch_qemu to fix LUKS support

2017-09-05 Thread Kevin Wolf
Am 01.09.2017 um 16:22 hat Eric Blake geschrieben: > On 09/01/2017 05:54 AM, Daniel P. Berrange wrote: > > 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 >

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

2017-09-05 Thread Thomas Huth
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 on global_qtest). Update the initialization >

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

2017-09-05 Thread Thomas Huth
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 callers. In particular, fw_cfg-test > had to reorder things to create the test state prior to

Re: [Qemu-block] [PATCH v2 2/4] block: use BDRV_SECTOR_SIZE in crypto driver

2017-09-05 Thread Kevin Wolf
Am 05.09.2017 um 12:05 hat Daniel P. Berrange geschrieben: > On Tue, Sep 05, 2017 at 11:52:15AM +0200, Kevin Wolf wrote: > > Am 31.08.2017 um 13:05 hat Daniel P. Berrange geschrieben: > > > Signed-off-by: Daniel P. Berrange > > > --- > > > block/crypto.c | 32

Re: [Qemu-block] [PATCH] block: Cleanup BMDS in bdrv_close_all

2017-09-05 Thread Stefan Hajnoczi
On Wed, Aug 30, 2017 at 06:06:05PM +0800, Fam Zheng wrote: > This fixes the assertion due to op blockers added by BMDS: > > block.c:3248: bdrv_delete: Assertion `bdrv_op_blocker_is_empty(bs)' failed. > > Reproducer: simply start block migration and quit QEMU before it ends. > > Cc:

Re: [Qemu-block] [PATCH] block: Cleanup BMDS in bdrv_close_all

2017-09-05 Thread Stefan Hajnoczi
On Tue, Sep 05, 2017 at 11:28:44AM +0100, Stefan Hajnoczi wrote: > On Wed, Aug 30, 2017 at 06:06:05PM +0800, Fam Zheng wrote: > > This fixes the assertion due to op blockers added by BMDS: > > > > block.c:3248: bdrv_delete: Assertion `bdrv_op_blocker_is_empty(bs)' failed. > > > > Reproducer:

Re: [Qemu-block] [PATCH v2 0/7] Refactor DMG driver to have chunk size independence

2017-09-05 Thread Ashijeet Acharya
On Tue, Sep 5, 2017 at 4:28 PM, Stefan Hajnoczi wrote: > On Wed, Aug 30, 2017 at 06:32:52PM +0530, Ashijeet Acharya wrote: > > On Tue, Aug 29, 2017 at 8:55 PM, Stefan Hajnoczi > wrote: > > > > > On Sun, Aug 20, 2017 at 1:47 PM, Ashijeet Acharya > > >

Re: [Qemu-block] [PATCH 2/2] iotests: blacklist 194 with the luks driver

2017-09-05 Thread Stefan Hajnoczi
On Fri, Sep 01, 2017 at 11:54:34AM +0100, Daniel P. Berrange wrote: > The 194 test has alot 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

Re: [Qemu-block] [PATCH v3 2/5] qemu-iotests: remove file cleanup from bash tests

2017-09-05 Thread Kevin Wolf
Am 30.08.2017 um 18:52 hat Jeff Cody geschrieben: > All files for a given test are now self-contained in a subdirectory, > and therefore the "./check" script can do all file-related cleanup > without any help. > > This removes file cleanups from the bash tests. The only cleanup left > is

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

2017-09-05 Thread Stefan Hajnoczi
On Fri, Sep 01, 2017 at 08:10:54PM +, Brian Steffens wrote: > This adds a boolean option called 'shared' to block devices. It defaults > to off/false. When enabled for a particular block device, the 'shared' option > causes the block migration code to skip over syncing of that device. This >

Re: [Qemu-block] [PATCH] block: Cleanup BMDS in bdrv_close_all

2017-09-05 Thread Juan Quintela
Kevin Wolf wrote: > Am 05.09.2017 um 10:54 hat Fam Zheng geschrieben: >> On Tue, 09/05 10:44, Kevin Wolf wrote: >> > Am 30.08.2017 um 12:06 hat Fam Zheng geschrieben: >> > > This fixes the assertion due to op blockers added by BMDS: >> > > >> > > block.c:3248: bdrv_delete:

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

2017-09-05 Thread Thomas Huth
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 callers. In particular, fw_cfg-test >> had to

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

2017-09-05 Thread Paolo Bonzini
> 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; > bool indirect; > bool event; > +

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

2017-09-05 Thread Kevin Wolf
Am 28.08.2017 um 04:57 hat Fam Zheng geschrieben: > On Fri, 08/25 15:44, Max Reitz wrote: > > Well, OK. The main argument against supporting anything but qcow2 is > > "if you want features, use qcow2; and we are working on making qcow2 as > > fast as possible." I think that's a very good

Re: [Qemu-block] [Qemu-devel] [PATCH v6 28/29] libqtest: Remove qtest_start() and qtest_end() shortcuts

2017-09-05 Thread Thomas Huth
On 01.09.2017 20:03, Eric Blake wrote: > Remove the trivial wrappers qtest_start() and qtest_end(), to make > it obvious in the rest of the testsuite where we are still relying on > global_qtest. Doing this makes it easier to see what remaining > cleanups will be needed if we don't want an

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

2017-09-05 Thread Thomas Huth
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 the duplication. This is too much code churn

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

2017-09-05 Thread Kevin Wolf
Am 23.08.2017 um 19:44 hat John Snow geschrieben: > On 08/23/2017 01:31 PM, Max Reitz wrote: > > On 2017-08-22 21:07, John Snow wrote: > > > > [...] > > > >> (3) Add either a new flag that turns qcow2's backing file into a full > >> R/W backing file, or add a new extension to qcow2 entirely

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

2017-09-05 Thread Fam Zheng
On Tue, 09/05 15:01, Kevin Wolf wrote: > Am 28.08.2017 um 04:57 hat Fam Zheng geschrieben: > > On Fri, 08/25 15:44, Max Reitz wrote: > > > Well, OK. The main argument against supporting anything but qcow2 is > > > "if you want features, use qcow2; and we are working on making qcow2 as > > > fast

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

2017-09-05 Thread Kevin Wolf
Am 05.09.2017 um 15:18 hat Fam Zheng geschrieben: > On Tue, 09/05 15:01, Kevin Wolf wrote: > > Am 28.08.2017 um 04:57 hat Fam Zheng geschrieben: > > > On Fri, 08/25 15:44, Max Reitz wrote: > > > > Well, OK. The main argument against supporting anything but qcow2 is > > > > "if you want features,