Re: [Qemu-block] [Qemu-devel] [PULL 00/18] Block layer patches

2016-09-29 Thread John Snow
On 09/29/2016 02:17 PM, Paolo Bonzini wrote: On 29/09/2016 19:02, John Snow wrote: On 09/29/2016 06:25 AM, Kevin Wolf wrote: John, can you have a look at the IDE code and check whether we can get rid of the deep recursion? It seems that the test issues a large request that is then split

Re: [Qemu-block] [Qemu-devel] [PULL 00/18] Block layer patches

2016-09-29 Thread John Snow
On 09/29/2016 06:25 AM, Kevin Wolf wrote: John, can you have a look at the IDE code and check whether we can get rid of the deep recursion? It seems that the test issues a large request that is then split into many small requests. But it should be possible to do this iteratively rather than

Re: [Qemu-block] [PATCH 0/5] blockjobs: Fix transactional race condition

2016-09-29 Thread John Snow
On 09/29/2016 07:33 AM, Kevin Wolf wrote: Am 28.09.2016 um 14:16 hat Vladimir Sementsov-Ogievskiy geschrieben: I think jobs will need to remain "one coroutine, one job" for now, but there's no reason why drive-backup or blockdev-backup can't just create multiple jobs each if that's what they

Re: [Qemu-block] [PATCH v2 05/11] blockjobs: split interface into public/private

2016-10-05 Thread John Snow
On 10/05/2016 10:17 AM, Kevin Wolf wrote: Am 01.10.2016 um 00:00 hat John Snow geschrieben: To make it a little more obvious which functions are intended to be public interface and which are intended to be for use only by jobs themselves, split the interface into "public" and "

[Qemu-block] [PATCH v9 02/10] HBitmap: Introduce "meta" bitmap to track bit changes

2016-10-04 Thread John Snow
From: Fam Zheng <f...@redhat.com> Upon each bit toggle, the corresponding bit in the meta bitmap will be set. Signed-off-by: Fam Zheng <f...@redhat.com> [Amended text inline. --js] Reviewed-by: Max Reitz <mre...@redhat.com> Signed-off-by: John Snow <js...@redhat.com> ---

[Qemu-block] [PATCH v9 03/10] tests: Add test code for meta bitmap

2016-10-04 Thread John Snow
From: Fam Zheng <f...@redhat.com> Signed-off-by: Fam Zheng <f...@redhat.com> Reviewed-by: John Snow <js...@redhat.com> Reviewed-by: Max Reitz <mre...@redhat.com> Signed-off-by: John Snow <js...@redhat.com> --- tests/test-hbitmap.c | 116 +

[Qemu-block] [PATCH v9 10/10] block: More operations for meta dirty bitmap

2016-10-04 Thread John Snow
. Signed-off-by: Fam Zheng <f...@redhat.com> Reviewed-by: Max Reitz <mre...@redhat.com> Signed-off-by: John Snow <js...@redhat.com> --- block/dirty-bitmap.c | 19 +++ include/block/dirty-bitmap.h | 3 +++ 2 files changed, 22 insertions(+) diff --git a/b

Re: [Qemu-block] [PATCH v2 06/11] blockjobs: fix documentation

2016-10-05 Thread John Snow
On 10/05/2016 11:03 AM, Kevin Wolf wrote: Am 01.10.2016 um 00:00 hat John Snow geschrieben: Wrong function names in documentation. Signed-off-by: John Snow <js...@redhat.com> --- include/block/blockjob_int.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/i

Re: [Qemu-block] [Qemu-devel] [PATCH v2 03/11] Blockjobs: Internalize user_pause logic

2016-10-04 Thread John Snow
On 10/03/2016 08:57 PM, Jeff Cody wrote: On Fri, Sep 30, 2016 at 06:00:41PM -0400, John Snow wrote: BlockJobs will begin hiding their state in preparation for some refactorings anyway, so let's internalize the user_pause mechanism instead of leaving it to callers to correctly manage. Signed

Re: [Qemu-block] [Qemu-devel] [PATCH v2 10/11] blockjob: refactor backup_start as backup_job_create

2016-10-07 Thread John Snow
On 09/30/2016 06:00 PM, John Snow wrote: Refactor backup_start as backup_job_create, which only creates the job, but does not automatically start it. The old interface, 'backup_start', is not kept in favor of limiting the number of nearly-identical iterfaces that would have to be edited

Re: [Qemu-block] [Qemu-devel] [PATCH v2 02/11] blockjob: centralize QMP event emissions

2016-10-06 Thread John Snow
On 10/06/2016 03:44 AM, Kevin Wolf wrote: Am 05.10.2016 um 20:49 hat John Snow geschrieben: On 10/05/2016 09:43 AM, Kevin Wolf wrote: Am 01.10.2016 um 00:00 hat John Snow geschrieben: @@ -3136,10 +3111,10 @@ void qmp_block_commit(bool has_job_id, const char *job_id, const char *device

Re: [Qemu-block] [Qemu-devel] [PATCH v2 04/11] blockjobs: Always use block_job_get_aio_context

2016-10-06 Thread John Snow
On 10/05/2016 10:02 AM, Kevin Wolf wrote: Am 01.10.2016 um 00:00 hat John Snow geschrieben: There are a few places where we're fishing it out for ourselves. Let's not do that and instead use the helper. Signed-off-by: John Snow <js...@redhat.com> That change makes a differenc

Re: [Qemu-block] [PATCH v2 09/11] blockjob: add block_job_start

2016-10-06 Thread John Snow
On 10/05/2016 11:17 AM, Kevin Wolf wrote: Am 01.10.2016 um 00:00 hat John Snow geschrieben: Instead of automatically starting jobs at creation time via backup_start et al, we'd like to return a job object pointer that can be started manually at later point in time. For now, add

[Qemu-block] [PATCH v9 06/10] block: Assert that bdrv_release_dirty_bitmap succeeded

2016-10-04 Thread John Snow
Max Reitz <mre...@redhat.com> Signed-off-by: John Snow <js...@redhat.com> --- block/dirty-bitmap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c index 860acc9..31d5296 100644 --- a/block/dirty-bitmap.c +++ b/block/dirty-bitmap.c @@ -

[Qemu-block] [PATCH v9 09/10] tests: Add test code for hbitmap serialization

2016-10-04 Thread John Snow
From: Fam Zheng <f...@redhat.com> Signed-off-by: Fam Zheng <f...@redhat.com> [Fixed minor constant issue. --js] Signed-off-by: John Snow <js...@redhat.com> Signed-off-by: John Snow <js...@redhat.com> --- tests/test-hbitmap.c | 155 +++

[Qemu-block] [PATCH v9 08/10] block: BdrvDirtyBitmap serialization interface

2016-10-04 Thread John Snow
d-off-by: Fam Zheng <f...@redhat.com> Reviewed-by: John Snow <js...@redhat.com> Reviewed-by: Max Reitz <mre...@redhat.com> Signed-off-by: John Snow <js...@redhat.com> --- block/dirty-bitmap.c | 37 + include/block/dirty-bitmap.h | 14

[Qemu-block] [PATCH v9 07/10] hbitmap: serialization

2016-10-04 Thread John Snow
while restoring. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> [Fix left shift operand to 1UL; add "finish" parameter. - Fam] Signed-off-by: Fam Zheng <f...@redhat.com> Signed-off-by: John Snow <js...@redhat.com> --- include/qemu/hbitmap.h | 79

[Qemu-block] [PATCH v9 05/10] block: Add two dirty bitmap getters

2016-10-04 Thread John Snow
From: Fam Zheng <f...@redhat.com> For dirty bitmap users to get the size and the name of a BdrvDirtyBitmap. Signed-off-by: Fam Zheng <f...@redhat.com> Reviewed-by: John Snow <js...@redhat.com> Reviewed-by: Max Reitz <mre...@redhat.com> Signed-off-by: John Snow <js...@r

[Qemu-block] [PATCH v9 00/10] Dirty bitmap changes for migration/persistence work

2016-10-04 Thread John Snow
Key: [] : patches are identical [] : number of functional differences between upstream/downstream patch [down] : patch is downstream-only The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively 001/10:[] [--] 'block: Hide HBitmap in block dirty bitmap

[Qemu-block] [PATCH v9 01/10] block: Hide HBitmap in block dirty bitmap interface

2016-10-04 Thread John Snow
e, now the new BdrvDirtyBitmapIter must be dynamically allocated because the structure definition is in block/dirty-bitmap.c. Two current users are converted too. Signed-off-by: Fam Zheng <f...@redhat.com> Reviewed-by: Max Reitz <mre...@redhat.com> Signed-off-by: John Snow <js...@r

Re: [Qemu-block] [Qemu-devel] [PATCH v2 02/11] blockjob: centralize QMP event emissions

2016-10-05 Thread John Snow
On 10/05/2016 09:43 AM, Kevin Wolf wrote: Am 01.10.2016 um 00:00 hat John Snow geschrieben: There's no reason to leave this to blockdev; we can do it in blockjobs directly and get rid of an extra callback for most users. Signed-off-by: John Snow <js...@redhat.com> --- blockdev.

Re: [Qemu-block] [Qemu-devel] backup notifier fail policy

2016-10-04 Thread John Snow
:34PM -0400, John Snow wrote: On 10/03/2016 09:11 AM, Stefan Hajnoczi wrote: On Fri, Sep 30, 2016 at 09:59:16PM +0300, Vladimir Sementsov-Ogievskiy wrote: On 30.09.2016 20:11, Vladimir Sementsov-Ogievskiy wrote: Hi all! Please, can somebody explain me, why we fail guest request in case of io

Re: [Qemu-block] [Qemu-devel] [PATCH v2 02/11] blockjob: centralize QMP event emissions

2016-10-05 Thread John Snow
On 10/05/2016 03:24 PM, Eric Blake wrote: On 10/05/2016 01:49 PM, John Snow wrote: Here we have an additional caller in block/replication.c and qemu-img, so the parameters must stay. For qemu-img, nothing changes. For replication, the block job events are added as a side effect. Not sure

[Qemu-block] [PATCH v4 1/2] block: reintroduce bdrv_flush_all

2016-09-19 Thread John Snow
ight thing.' Signed-off-by: John Snow <js...@redhat.com> Reviewed-by: Kevin Wolf <kw...@redhat.com> --- block/io.c| 25 + include/block/block.h | 1 + 2 files changed, 26 insertions(+) diff --git a/block/io.c b/block/io.c index fdf7080..913df51 100644

[Qemu-block] [PATCH v4 0/2] block: allow flush on devices with open tray

2016-09-19 Thread John Snow
at: https://github.com/jnsnow/qemu.git branch atapi-tray-migfix https://github.com/jnsnow/qemu/tree/atapi-tray-migfix This version is tagged atapi-tray-migfix-v4: https://github.com/jnsnow/qemu/releases/tag/atapi-tray-migfix-v4 John Snow (2): block: reintroduce bdrv_flush_all qemu: use

Re: [Qemu-block] [Qemu-devel] [PATCH v4 0/2] block: allow flush on devices with open tray

2016-09-19 Thread John Snow
On 09/19/2016 02:15 PM, no-re...@ec2-52-6-146-230.compute-1.amazonaws.com wrote: Hi, Your series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. lies and slander! Subject:

[Qemu-block] [PATCH v5 1/3] block: reintroduce bdrv_flush_all

2016-09-22 Thread John Snow
ight thing.' Signed-off-by: John Snow <js...@redhat.com> Reviewed-by: Kevin Wolf <kw...@redhat.com> --- block/io.c| 25 + include/block/block.h | 1 + 2 files changed, 26 insertions(+) diff --git a/block/io.c b/block/io.c index fdf7080..57a2eeb 100644

[Qemu-block] [PATCH v5 0/3] block: allow flush on devices with open tray

2016-09-22 Thread John Snow
gged atapi-tray-migfix-v5: https://github.com/jnsnow/qemu/releases/tag/atapi-tray-migfix-v5 John Snow (3): block: reintroduce bdrv_flush_all qemu: use bdrv_flush_all for vm_stop et al block-backend: remove blk_flush_all block/block-backend.c | 22 --

[Qemu-block] [PATCH v5 2/3] qemu: use bdrv_flush_all for vm_stop et al

2016-09-22 Thread John Snow
need to be flushed, or nodes that aren't currently attached to any device and need to be flushed. Specifically, this allows us to migrate when we have a CDROM with an open tray. Signed-off-by: John Snow <js...@redhat.com> Reviewed-by: Kevin Wolf <kw...@redhat.com> --- cpus.c | 4

[Qemu-block] [PATCH v5 3/3] block-backend: remove blk_flush_all

2016-09-22 Thread John Snow
that requires flushing, or use an appropriate flush_all mechanism from outside of the BlkBackend layer. Signed-off-by: John Snow <js...@redhat.com> --- block/block-backend.c | 22 -- hw/i386/xen/xen_platform.c | 2 -- hw/ide/piix.c

Re: [Qemu-block] [Qemu-devel] [PATCH] MAINTAINERS: Add some more headers to the IDE section

2016-09-23 Thread John Snow
+++ b/MAINTAINERS @@ -791,6 +791,7 @@ M: John Snow <js...@redhat.com> L: qemu-block@nongnu.org S: Supported F: include/hw/ide.h +F: include/hw/ide/ F: hw/ide/ F: hw/block/block.c F: hw/block/cdrom.c Ah, yeah. These got missed when they were moved over. Thanks. Reviewed-by: J

Re: [Qemu-block] [Qemu-devel] [PATCH v5 0/3] block: allow flush on devices with open tray

2016-09-23 Thread John Snow
On 09/23/2016 11:35 AM, Max Reitz wrote: On 23.09.2016 03:45, John Snow wrote: When I said "Final re-send," I was lying. Here's a v5. The title is also a misnomer by now :) The move to blk_flush altered the behavior of migration and flushing nodes that are not reachable via

[Qemu-block] [PATCH 1/1] ahci: clear aiocb in ncq_cb

2016-09-22 Thread John Snow
Similar to existing fixes for IDE and ATAPI, the AIOCB must be cleared in the callback. Otherwise, we may accidentally try to reset it after the object has been released. Signed-off-by: John Snow <js...@redhat.com> --- hw/ide/ahci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/

[Qemu-block] [PATCH 0/1] ahci: fix ncq aiocb-related segfault

2016-09-22 Thread John Snow
Fix ncq_cb to prevent a segfault on sys_reset. John Snow (1): ahci: clear aiocb in ncq_cb hw/ide/ahci.c | 1 + 1 file changed, 1 insertion(+) -- 2.7.4

Re: [Qemu-block] [PATCH v3 0/2] block: allow flush on devices with open tray

2016-09-16 Thread John Snow
On 09/16/2016 04:33 AM, Kevin Wolf wrote: Am 16.09.2016 um 01:42 hat John Snow geschrieben: One more try. The move to blk_flush altered the behavior of migration and flushing nodes that are not reachable via the guest, but are still reachable via QEMU and may or may not need to be flushed

Re: [Qemu-block] [PATCH v3 2/2] qemu: use bdrv_flush_all for vm_stop et al

2016-09-16 Thread John Snow
On 09/15/2016 07:42 PM, John Snow wrote: Bypass the usual check to see if we are "allowed" to flush via the block model, and manually flush the BDS nodes themselves instead. This allows us to do things like migrate when we have a device with an open tray, but has a node tha

Re: [Qemu-block] [Qemu-devel] [PATCH v4 0/2] block: allow flush on devices with open tray

2016-09-19 Thread John Snow
On 09/19/2016 04:58 PM, Max Reitz wrote: On 19.09.2016 18:44, John Snow wrote: Final re-send for wording. The move to blk_flush altered the behavior of migration and flushing nodes that are not reachable via the guest, but are still reachable via QEMU and may or may not need to be flushed

Re: [Qemu-block] [Qemu-devel] [PATCH] atapi: allow 0 transfer bytes for read_cd command

2016-08-18 Thread John Snow
On 08/18/2016 05:48 AM, Hervé Poussineau wrote: This fixes Windows NT4 startup when a cdrom is inserted. Fixes: 9ef2e93f9b1888c7d0deb4a105149138e6ad2e98 Signed-off-by: Hervé Poussineau --- hw/ide/atapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Qemu-block] Transactions, Jobs, and Cancellation

2016-09-30 Thread John Snow
Hi Eric (as a proxy for Libvirt); I want to make a change to transactions such that they do not actually start the jobs until the entire transaction is error-checked for validity. This would be a change from the current setup where: - Some jobs are started - One job cannot start - Existing

Re: [Qemu-block] Transactions, Jobs, and Cancellation

2016-09-30 Thread John Snow
On 09/30/2016 02:30 PM, Eric Blake wrote: On 09/30/2016 11:35 AM, John Snow wrote: Hi Eric (as a proxy for Libvirt); I want to make a change to transactions such that they do not actually start the jobs until the entire transaction is error-checked for validity. This would be a change from

Re: [Qemu-block] backup notifier fail policy

2016-10-03 Thread John Snow
On 10/03/2016 09:11 AM, Stefan Hajnoczi wrote: On Fri, Sep 30, 2016 at 09:59:16PM +0300, Vladimir Sementsov-Ogievskiy wrote: On 30.09.2016 20:11, Vladimir Sementsov-Ogievskiy wrote: Hi all! Please, can somebody explain me, why we fail guest request in case of io error in write notifier? I

[Qemu-block] [PATCH v2 10/11] blockjob: refactor backup_start as backup_job_create

2016-09-30 Thread John Snow
finish before we even finish building the transaction. This may happen, for instance, during empty block backup jobs. Reported-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> Signed-off-by: John Snow <js...@redhat.com> --- block/backup.c| 26 --

[Qemu-block] [PATCH v2 04/11] blockjobs: Always use block_job_get_aio_context

2016-09-30 Thread John Snow
There are a few places where we're fishing it out for ourselves. Let's not do that and instead use the helper. Signed-off-by: John Snow <js...@redhat.com> --- block/io.c | 4 ++-- blockdev.c | 4 ++-- blockjob.c | 2 +- include/block/blockjob

[Qemu-block] [PATCH v2 01/11] blockjob: fix dead pointer in txn list

2016-09-30 Thread John Snow
ddress the underlying issues, but this should fix list inconsistencies. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> Tested-by: John Snow <js...@redhat.com> Reviewed-by: John Snow <js...@redhat.com> [Rewrote commit message. --js] Signed-off-by: John Snow <js...@re

[Qemu-block] [PATCH v2 07/11] blockjob: add .clean property

2016-09-30 Thread John Snow
or not we actually started the job. Therefore, cleanup callbacks should essentially confine themselves to undoing create operations, e.g. setup actions taken in what is now backup_run. Reported-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> Signed-off-by: John Snow <js...@r

[Qemu-block] [PATCH v2 06/11] blockjobs: fix documentation

2016-09-30 Thread John Snow
Wrong function names in documentation. Signed-off-by: John Snow <js...@redhat.com> --- include/block/blockjob_int.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/block/blockjob_int.h b/include/block/blockjob_int.h index 0a2d41e..c6da7e4 100644 --- a/i

[Qemu-block] [PATCH v2 02/11] blockjob: centralize QMP event emissions

2016-09-30 Thread John Snow
There's no reason to leave this to blockdev; we can do it in blockjobs directly and get rid of an extra callback for most users. Signed-off-by: John Snow <js...@redhat.com> --- blockdev.c | 37 ++--- blockjob.c | 16 ++-- 2 files changed, 20 inse

[Qemu-block] [PATCH v2 00/11] blockjobs: Fix transactional race condition

2016-09-30 Thread John Snow
://github.com/jnsnow/qemu/releases/tag/job-manual-start-v2 John Snow (10): blockjob: centralize QMP event emissions Blockjobs: Internalize user_pause logic blockjobs: Always use block_job_get_aio_context blockjobs: split interface into public/private blockjobs: fix documentation

[Qemu-block] [PATCH v2 03/11] Blockjobs: Internalize user_pause logic

2016-09-30 Thread John Snow
BlockJobs will begin hiding their state in preparation for some refactorings anyway, so let's internalize the user_pause mechanism instead of leaving it to callers to correctly manage. Signed-off-by: John Snow <js...@redhat.com> --- block/io.c | 2 +- blockdev.c

[Qemu-block] [PATCH v2 11/11] iotests: add transactional failure race test

2016-09-30 Thread John Snow
Add a regression test for the case found by Vladimir. Reported-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> Signed-off-by: John Snow <js...@redhat.com> --- tests/qemu-iotests/124 | 91 ++ tests/qemu-iotests/124.out | 4

[Qemu-block] [PATCH v2 05/11] blockjobs: split interface into public/private

2016-09-30 Thread John Snow
blockdev and others on the public interface. Give up and let qemu-img use the internal interface, though it doesn't strictly need to be using it. As a side-effect, hide the BlockJob and BlockJobDriver implementation from most of the QEMU codebase. Signed-off-by: John Snow <js...@redhat.c

[Qemu-block] [PATCH v2 08/11] blockjob: add .start field

2016-09-30 Thread John Snow
start a BlockJob in block_job_start. This avoids the sticky question of how to "un-create" a Coroutine that hasn't been started yet. Signed-off-by: John Snow <js...@redhat.com> --- block/backup.c | 23 --- block/commit.c | 3 ++-

[Qemu-block] [PATCH v2 09/11] blockjob: add block_job_start

2016-09-30 Thread John Snow
-by-job coming in later patches. Of note: cancellation of unstarted jobs will perform all the normal cleanup as if the job had started, particularly abort and clean. The only difference is that we will not emit any events, because the job never actually started. Signed-off-by: John Snow <

Re: [Qemu-block] [Qemu-devel] [PATCH 2/3] fdc: Add a floppy drive qdev

2016-09-29 Thread John Snow
On 09/05/2016 11:43 AM, Kevin Wolf wrote: Floppy controllers automatically create two floppy drive devices in qdev now. (They always created two drives, but managed them only internally.) This appears to *actually* create and expose two drives by default, is this intentional? Previously,

Re: [Qemu-block] [PATCH v2 03/11] Blockjobs: Internalize user_pause logic

2016-10-03 Thread John Snow
On 10/03/2016 08:57 PM, Jeff Cody wrote: On Fri, Sep 30, 2016 at 06:00:41PM -0400, John Snow wrote: BlockJobs will begin hiding their state in preparation for some refactorings anyway, so let's internalize the user_pause mechanism instead of leaving it to callers to correctly manage. Signed

Re: [Qemu-block] [Qemu-devel] [PATCH v2 02/11] blockjob: centralize QMP event emissions

2016-10-10 Thread John Snow
On 10/10/2016 12:45 PM, Kashyap Chamarthy wrote: On Wed, Oct 05, 2016 at 05:00:29PM -0400, John Snow wrote: [Arbitrarily chiming here, and still catching up with the details of the thread.] On 10/05/2016 03:24 PM, Eric Blake wrote: On 10/05/2016 01:49 PM, John Snow wrote: [...] Hmm, do

Re: [Qemu-block] [Qemu-devel] [PATCH 0/7] blockjobs: preliminary refactoring work, Pt 1

2016-10-26 Thread John Snow
On 10/26/2016 12:52 AM, Jeff Cody wrote: On Fri, Oct 14, 2016 at 02:32:55PM -0400, John Snow wrote: On 10/13/2016 06:56 PM, John Snow wrote: This is a follow-up to patches 1-6 of: [PATCH v2 00/11] blockjobs: Fix transactional race condition That series started trying to refactor blockjobs

[Qemu-block] [PATCH] block-backend: Always notify on blk_eject

2016-10-28 Thread John Snow
/bugzilla.redhat.com/show_bug.cgi?id=1373264 Reported-by: Peter Krempa <pkre...@redhat.com> Signed-off-by: John Snow <js...@redhat.com> --- block/block-backend.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/block/block-backend.c b/block/block-backend

Re: [Qemu-block] [Qemu-devel] [PATCH] block-backend: Always notify on blk_eject

2016-10-28 Thread John Snow
On 10/28/2016 05:23 PM, John Snow wrote: blk_eject is only used by scsi-disk and atapi, and in both cases we only attempt to invoke blk_eject if we have a bona-fide change in tray state. The "issue" here is that the tray state does not generate a QMP event unless there is a

Re: [Qemu-block] [Qemu-devel] [PATCH v3 5/6] blockjob: refactor backup_start as backup_job_create

2016-11-08 Thread John Snow
On 11/08/2016 04:11 AM, Kevin Wolf wrote: Am 08.11.2016 um 06:41 hat John Snow geschrieben: On 11/03/2016 09:17 AM, Kevin Wolf wrote: Am 02.11.2016 um 18:50 hat John Snow geschrieben: Refactor backup_start as backup_job_create, which only creates the job, but does not automatically start

[Qemu-block] [PATCH v2 4/6] libqos/ahci: Add ATAPI tray macros

2016-11-07 Thread John Snow
(1) Add START_STOP_UNIT command to ahci-test suite (2) Add eject/start macro commands; this is not a data transfer command so it is not well-served by the existing generic pipeline. Signed-off-by: John Snow <js...@redhat.com> --- tests/libqos/ahci.c | 30 ++

[Qemu-block] [PATCH v2 3/6] libqos/ahci: Support expected errors

2016-11-07 Thread John Snow
Sometimes we know we'll get back an error, so let's have the test framework understand that. Signed-off-by: John Snow <js...@redhat.com> --- tests/libqos/ahci.c | 16 tests/libqos/ahci.h | 3 ++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/tests/

[Qemu-block] [PATCH v2 0/6] block-backend: Always notify on blk_eject

2016-11-07 Thread John Snow
://github.com/jnsnow/qemu/releases/tag/tray-always-notify-v2 John Snow (6): block-backend: Always notify on blk_eject libqtest: add qmp_eventwait_ref libqos/ahci: Support expected errors libqos/ahci: Add ATAPI tray macros libqos/ahci: Add get_sense and test_ready ahci-test: add QMP tray test

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.8] block: Don't mark node clean after failed flush

2016-11-07 Thread John Snow
": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN"} +QEMU_PROG: Failed to flush the L2 table cache: Input/output error +QEMU_PROG: Failed to flush the refcount block cache: Input/output error *** done Reviewed-by: John Snow <js...@redhat.com>

[Qemu-block] [PATCH v2 6/6] ahci-test: add QMP tray test for ATAPI

2016-11-07 Thread John Snow
Test QMP events for a CDROM device with or without a media inserted, including both guest-initiated and hw-initiated eject/load requests. Signed-off-by: John Snow <js...@redhat.com> --- tests/ahci-test.c | 98 +++ 1 file changed, 98 inse

[Qemu-block] [PATCH v4 5/6] blockjob: refactor backup_start as backup_job_create

2016-11-07 Thread John Snow
finish before we even finish building the transaction. This may happen, for instance, during empty block backup jobs. Reported-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> Signed-off-by: John Snow <js...@redhat.com> --- block/backup.c| 26 --

Re: [Qemu-block] [Qemu-devel] [PATCH v3 5/6] blockjob: refactor backup_start as backup_job_create

2016-11-07 Thread John Snow
On 11/03/2016 09:17 AM, Kevin Wolf wrote: Am 02.11.2016 um 18:50 hat John Snow geschrieben: Refactor backup_start as backup_job_create, which only creates the job, but does not automatically start it. The old interface, 'backup_start', is not kept in favor of limiting the number of nearly

[Qemu-block] [PATCH v4 4/6] blockjob: add block_job_start

2016-11-07 Thread John Snow
-by-job coming in later patches. Of note: cancellation of unstarted jobs will perform all the normal cleanup as if the job had started, particularly abort and clean. The only difference is that we will not emit any events, because the job never actually started. Signed-off-by: John Snow <

[Qemu-block] [PATCH v4 0/6] jobs: fix transactional race condition

2016-11-07 Thread John Snow
://github.com/jnsnow/qemu/tree/job-fix-race-condition This version is tagged job-fix-race-condition-v4: https://github.com/jnsnow/qemu/releases/tag/job-fix-race-condition-v4 John Snow (5): blockjob: add .clean property blockjob: add .start field blockjob: add block_job_start blockjob: refactor

[Qemu-block] [PATCH v4 1/6] blockjob: fix dead pointer in txn list

2016-11-07 Thread John Snow
ddress the underlying issues, but this should fix list inconsistencies. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> Tested-by: John Snow <js...@redhat.com> Reviewed-by: John Snow <js...@redhat.com> [Rewrote commit message. --js] Signed-off-by: John Snow <js...@re

[Qemu-block] [PATCH v4 3/6] blockjob: add .start field

2016-11-07 Thread John Snow
start a BlockJob in block_job_start. This avoids the sticky question of how to "un-create" a Coroutine that hasn't been started yet. Signed-off-by: John Snow <js...@redhat.com> Reviewed-by: Kevin Wolf <kw...@redhat.com> --- block/backup.c | 25 +--

[Qemu-block] [PATCH v4 2/6] blockjob: add .clean property

2016-11-07 Thread John Snow
or not we actually started the job. Therefore, cleanup callbacks should essentially confine themselves to undoing create operations, e.g. setup actions taken in what is now backup_start. Reported-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> Signed-off-by: John Snow <js...@r

[Qemu-block] [PATCH v4 6/6] iotests: add transactional failure race test

2016-11-07 Thread John Snow
Add a regression test for the case found by Vladimir. Reported-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> Signed-off-by: John Snow <js...@redhat.com> Reviewed-by: Kevin Wolf <kw...@redhat.com> --- tests/qemu-io

Re: [Qemu-block] [Qemu-devel] [PATCH v3 4/6] blockjob: add block_job_start

2016-11-07 Thread John Snow
On 11/07/2016 09:05 PM, Jeff Cody wrote: On Mon, Nov 07, 2016 at 09:02:14PM -0500, John Snow wrote: On 11/03/2016 08:17 AM, Kevin Wolf wrote: Am 02.11.2016 um 18:50 hat John Snow geschrieben: Instead of automatically starting jobs at creation time via backup_start et al, we'd like

Re: [Qemu-block] [Qemu-devel] [PATCH v3 4/6] blockjob: add block_job_start

2016-11-07 Thread John Snow
On 11/03/2016 08:17 AM, Kevin Wolf wrote: Am 02.11.2016 um 18:50 hat John Snow geschrieben: Instead of automatically starting jobs at creation time via backup_start et al, we'd like to return a job object pointer that can be started manually at later point in time. For now, add

Re: [Qemu-block] [Qemu-devel] [PATCH v2 0/6] block-backend: Always notify on blk_eject

2016-11-11 Thread John Snow
On 11/11/2016 09:01 AM, Kevin Wolf wrote: Am 07.11.2016 um 22:13 hat John Snow geschrieben: Requires patches in my IDE branch, for context. This series changes blk_eject (used for a software-initiated eject request) to always trigger a QMP tray event, in contrast to the current behavior

Re: [Qemu-block] [Qemu-devel] [PATCH v2 0/6] block-backend: Always notify on blk_eject

2016-11-10 Thread John Snow
Ping, Kevin: Look ok? --js On 11/07/2016 04:13 PM, John Snow wrote: Requires patches in my IDE branch, for context. This series changes blk_eject (used for a software-initiated eject request) to always trigger a QMP tray event, in contrast to the current behavior where a tray event only

Re: [Qemu-block] [Qemu-devel] [PATCH v3 4/4] qemu-iotests: Test creating floppy drives

2016-10-19 Thread John Snow
On 10/19/2016 03:37 AM, Kevin Wolf wrote: Am 18.10.2016 um 21:53 hat Eric Blake geschrieben: On 10/18/2016 02:45 PM, John Snow wrote: On 10/18/2016 06:22 AM, Kevin Wolf wrote: This tests the different supported methods to create floppy drives and how they interact. +function

Re: [Qemu-block] [Qemu-devel] [PATCH v2 1/4] fdc: Add a floppy qbus

2016-10-14 Thread John Snow
i) @@ -2744,6 +2773,7 @@ static void fdc_register_types(void) type_register_static(_fdc_type_info); type_register_static(_fdc_info); type_register_static(_fdc_info); +type_register_static(_bus_info); } type_init(fdc_register_types) Reviewed-by: John Snow <js...@redhat.com>

Re: [Qemu-block] [Qemu-devel] [PATCHv2 0/2] dma-helpers: explicitly pass alignment into DMA helpers

2016-10-14 Thread John Snow
On 10/14/2016 07:41 AM, Mark Cave-Ayland wrote: This is a follow-up to the thread at https://lists.gnu.org/archive/html/qemu-devel/2016-09/msg01396.html which introduces an explicit alignment to the DMA helpers to facilitate conversion of the macio controller over to use the now byte-aligned

Re: [Qemu-block] [Qemu-devel] [PATCH v2 2/4] fdc: Add a floppy drive qdev

2016-10-14 Thread John Snow
true, "realized", _err); +if (local_err) { +error_propagate(errp, local_err); +return; } -fd_revalidate(drive); } } @@ -2774,6 +2862,7 @@ static void fdc_register_types(void) type_register_static(_fdc_info); type_register_static(_fdc_info); type_register_static(_bus_info); +type_register_static(_drive_info); } type_init(fdc_register_types) Reviewed-by: John Snow <js...@redhat.com>

Re: [Qemu-block] [Qemu-devel] [PATCH v2 3/4] fdc: Move qdev properties to FloppyDrive

2016-10-14 Thread John Snow
On 09/30/2016 03:39 PM, Kevin Wolf wrote: This makes the FloppyDrive qdev object actually useful: Now that it has all properties that don't belong to the controller, you can actually use '-device floppy' and get a working result. Command line semantics is consistent with CD-ROM drives: By

Re: [Qemu-block] [PATCH v2 09/11] blockjob: add block_job_start

2016-10-17 Thread John Snow
On 10/06/2016 06:44 PM, John Snow wrote: On 10/05/2016 11:17 AM, Kevin Wolf wrote: Am 01.10.2016 um 00:00 hat John Snow geschrieben: Instead of automatically starting jobs at creation time via backup_start et al, we'd like to return a job object pointer that can be started manually

Re: [Qemu-block] [Qemu-devel] [PATCH v3 4/4] qemu-iotests: Test creating floppy drives

2016-10-18 Thread John Snow
On 10/18/2016 06:22 AM, Kevin Wolf wrote: This tests the different supported methods to create floppy drives and how they interact. Signed-off-by: Kevin Wolf --- tests/qemu-iotests/172 | 242 + tests/qemu-iotests/172.out | 1205

Re: [Qemu-block] [Qemu-devel] [PATCH real v5 0/4] fdc: Use separate qdev device for drives

2016-10-25 Thread John Snow
fdc.use.separate.qdev.device.for.drives.EN.V5.REPACK.PC.LINUX-kw0lf-kr3w _____ .__ _ __ | | _ _\ _ \ | |_/ \ | | \_ \_ _ __ | |/ /\ \/ \/ / /_\ \| |\ __\ | |/ /\_ __ \_(__ < \/ \/ / |< \ /\ \_/ \

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

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

2016-10-21 Thread John Snow
| 4 ++-- configure | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) rename block/{raw-posix.c => file-posix.c} (100%) rename block/{raw-win32.c => file-win32.c} (100%) rename block/{raw_bsd.c => raw.c} (100%) You got all the comments and everything!

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 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 <js...@redhat.com> 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_dra

Re: [Qemu-block] [Qemu-devel] [PATCH v5 0/4] fdc: Use separate qdev device for drives

2016-10-24 Thread John Snow
On 10/24/2016 07:37 AM, Kevin Wolf wrote: We have been complaining for a long time about how the floppy controller and floppy drives are combined in a single qdev device and how this makes the device awkward to work with because it behaves different from all other block devices. The latest

[Qemu-block] [PATCH v2 1/6] blockjob: fix dead pointer in txn list

2016-10-24 Thread John Snow
ddress the underlying issues, but this should fix list inconsistencies. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> Tested-by: John Snow <js...@redhat.com> Reviewed-by: John Snow <js...@redhat.com> [Rewrote commit message. --js] Signed-off-by: John Snow <js...@re

[Qemu-block] [PATCH v2 2/6] blockjob: add .clean property

2016-10-24 Thread John Snow
or not we actually started the job. Therefore, cleanup callbacks should essentially confine themselves to undoing create operations, e.g. setup actions taken in what is now backup_start. Reported-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> Signed-off-by: John Snow <js...@r

[Qemu-block] [PATCH v2 0/6] jobs: fix transactional race condition

2016-10-24 Thread John Snow
is tagged job-fix-race-condition-v2: https://github.com/jnsnow/qemu/releases/tag/job-fix-race-condition-v2 John Snow (5): blockjob: add .clean property blockjob: add .start field blockjob: add block_job_start blockjob: refactor backup_start as backup_job_create iotests: add transactional

[Qemu-block] [PATCH v2 6/6] iotests: add transactional failure race test

2016-10-24 Thread John Snow
Add a regression test for the case found by Vladimir. Reported-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> Signed-off-by: John Snow <js...@redhat.com> --- tests/qemu-iotests/124 | 53 ++ tests/qemu-iotests/124.out | 4 +

[Qemu-block] [PATCH v2 3/6] blockjob: add .start field

2016-10-24 Thread John Snow
start a BlockJob in block_job_start. This avoids the sticky question of how to "un-create" a Coroutine that hasn't been started yet. Signed-off-by: John Snow <js...@redhat.com> --- block/backup.c | 23 --- block/commit.c | 3 ++-

[Qemu-block] [PATCH v2 5/6] blockjob: refactor backup_start as backup_job_create

2016-10-24 Thread John Snow
finish before we even finish building the transaction. This may happen, for instance, during empty block backup jobs. Reported-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> Signed-off-by: John Snow <js...@redhat.com> --- block/backup.c| 26 --

[Qemu-block] [PATCH v2 4/6] blockjob: add block_job_start

2016-10-24 Thread John Snow
-by-job coming in later patches. Of note: cancellation of unstarted jobs will perform all the normal cleanup as if the job had started, particularly abort and clean. The only difference is that we will not emit any events, because the job never actually started. Signed-off-by: John Snow <

Re: [Qemu-block] [PATCH v4 0/4] fdc: Use separate qdev device for drives

2016-10-20 Thread John Snow
On 10/20/2016 03:55 AM, Kevin Wolf wrote: We have been complaining for a long time about how the floppy controller and floppy drives are combined in a single qdev device and how this makes the device awkward to work with because it behaves different from all other block devices. The latest

[Qemu-block] [PATCH 2/5] blockjob: add .clean property

2016-10-20 Thread John Snow
or not we actually started the job. Therefore, cleanup callbacks should essentially confine themselves to undoing create operations, e.g. setup actions taken in what is now backup_start. Reported-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> Signed-off-by: John Snow <js...@r

[Qemu-block] [PATCH 1/5] blockjob: fix dead pointer in txn list

2016-10-20 Thread John Snow
ddress the underlying issues, but this should fix list inconsistencies. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> Tested-by: John Snow <js...@redhat.com> Reviewed-by: John Snow <js...@redhat.com> [Rewrote commit message. --js] Signed-off-by: John Snow <js...@re

<    4   5   6   7   8   9   10   11   12   13   >