Re: [Qemu-block] [PATCH v2 0/2] AHCI: avoid mapping stale guest memory

2015-03-25 Thread Stefan Hajnoczi
AHCI: Protect cmd register hw/ide/ahci.c | 76 +-- hw/ide/ahci.h | 2 ++ 2 files changed, 60 insertions(+), 18 deletions(-) -- 1.9.3 Reviewed-by: Stefan Hajnoczi stefa...@redhat.com pgpOSR3qQ8GIt.pgp Description: PGP signature

Re: [Qemu-block] [Qemu-devel] [PATCH] block: avoid unnecessary bottom halves

2015-03-30 Thread Stefan Hajnoczi
insertions(+), 9 deletions(-) Reviewed-by: Stefan Hajnoczi stefa...@redhat.com pgpWC2eTZYvAV.pgp Description: PGP signature

Re: [Qemu-block] [Qemu-devel] [PATCH] mirror: hold aio_context before bdrv_drain

2015-04-01 Thread Stefan Hajnoczi
On Wed, Apr 01, 2015 at 04:49:39PM +0800, Bin Wu wrote: On 2015/4/1 16:19, Fam Zheng wrote: On Wed, 04/01 12:42, Bin Wu wrote: From: Bin Wu wu.wu...@huawei.com What's the issue are you fixing? I think the coroutine already is running in the AioContext of bs. Fam In the

Re: [Qemu-block] [PATCH v2 0/3] null driver patches

2015-04-01 Thread Stefan Hajnoczi
+++- qapi/block-core.json | 5 +++- 3 files changed, 70 insertions(+), 7 deletions(-) -- 1.9.3 Reviewed-by: Stefan Hajnoczi stefa...@redhat.com pgpvoAt_480IA.pgp Description: PGP signature

Re: [Qemu-block] [PATCH for-2.3 0/4] ahci: fix big endian PIO failures

2015-03-23 Thread Stefan Hajnoczi
3 files changed, 33 insertions(+), 15 deletions(-) -- 2.1.0 Reviewed-by: Stefan Hajnoczi stefa...@redhat.com pgpJ8L_2utMMK.pgp Description: PGP signature

Re: [Qemu-block] [Qemu-devel] [PATCH v4 08/20] block: Add bitmap disabled status

2015-04-02 Thread Stefan Hajnoczi
-by: John Snow js...@redhat.com Reviewed-by: Max Reitz mre...@redhat.com --- block.c | 25 + include/block/block.h | 3 +++ 2 files changed, 28 insertions(+) Reviewed-by: Stefan Hajnoczi stefa...@redhat.com pgpAIIGuPYk4O.pgp Description: PGP signature

Re: [Qemu-block] [PATCH v4 10/20] qmp: Add support of dirty-bitmap sync mode for drive-backup

2015-04-02 Thread Stefan Hajnoczi
On Fri, Mar 20, 2015 at 03:16:53PM -0400, John Snow wrote: +} else if (job-sync_mode == MIRROR_SYNC_MODE_DIRTY_BITMAP) { +/* Dirty Bitmap sync has a slightly different iteration method */ +HBitmapIter hbi; +int64_t sector; +int64_t cluster; +

Re: [Qemu-block] [PATCH v4 11/20] qmp: add block-dirty-bitmap-clear

2015-04-02 Thread Stefan Hajnoczi
+ 5 files changed, 86 insertions(+) Reviewed-by: Stefan Hajnoczi stefa...@redhat.com pgprmx0YS6J8j.pgp Description: PGP signature

Re: [Qemu-block] [PATCH v4 14/20] block: Ensure consistent bitmap function prototypes

2015-04-02 Thread Stefan Hajnoczi
/backup.c| 2 +- block/mirror.c| 26 ++ blockdev.c| 2 +- include/block/block.h | 11 +-- migration/block.c | 7 +++ 6 files changed, 26 insertions(+), 35 deletions(-) Reviewed-by: Stefan Hajnoczi stefa...@redhat.com

Re: [Qemu-block] [Qemu-devel] [PATCH v4 12/20] qmp: Add dirty bitmap status field in query-block

2015-04-02 Thread Stefan Hajnoczi
| 1 + qapi/block-core.json | 5 - 2 files changed, 5 insertions(+), 1 deletion(-) Reviewed-by: Stefan Hajnoczi stefa...@redhat.com pgpFvjlQX7Pb9.pgp Description: PGP signature

Re: [Qemu-block] [PATCH v4 07/20] hbitmap: add hbitmap_merge

2015-04-02 Thread Stefan Hajnoczi
...@redhat.com Reviewed-by: Max Reitz mre...@redhat.com --- include/qemu/hbitmap.h | 11 +++ util/hbitmap.c | 29 + 2 files changed, 40 insertions(+) Reviewed-by: Stefan Hajnoczi stefa...@redhat.com pgpdVOFdn2fEC.pgp Description: PGP signature

Re: [Qemu-block] [PATCH v4 13/20] block: add BdrvDirtyBitmap documentation

2015-04-02 Thread Stefan Hajnoczi
On Fri, Mar 20, 2015 at 03:16:56PM -0400, John Snow wrote: Signed-off-by: John Snow js...@redhat.com Reviewed-by: Max Reitz mre...@redhat.com --- block.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) Reviewed-by: Stefan Hajnoczi stefa...@redhat.com pgpSgc0g1v0CF.pgp

Re: [Qemu-block] RFC iscsi: set FUA and DPO if !bs-enable_write_cache

2015-04-14 Thread Stefan Hajnoczi
On Tue, Apr 14, 2015 at 7:49 AM, Peter Lieven p...@kamp.de wrote: Ronnie came up with an idea to reduce latency if !bs-enable_write_cache for an iSCSI device. If !bs-enable_write_cache Qemu sends a flush after every single write. What could be done is the following: if

Re: [Qemu-block] [PATCH v6 20/21] iotests: add incremental backup failure recovery test

2015-04-23 Thread Stefan Hajnoczi
-iotests/124.out | 4 ++-- 2 files changed, 59 insertions(+), 2 deletions(-) Reviewed-by: Stefan Hajnoczi stefa...@redhat.com pgpEXpOJWS7ep.pgp Description: PGP signature

Re: [Qemu-block] [PATCH v6 21/21] iotests: add incremental backup granularity tests

2015-04-23 Thread Stefan Hajnoczi
/qemu-iotests/124.out | 4 ++-- 2 files changed, 49 insertions(+), 13 deletions(-) Reviewed-by: Stefan Hajnoczi stefa...@redhat.com pgpvKb06jALns.pgp Description: PGP signature

Re: [Qemu-block] [PATCH v2 0/3] null driver patches

2015-04-20 Thread Stefan Hajnoczi
On Wed, Apr 01, 2015 at 09:45:37AM +0800, Fam Zheng wrote: v2: Change patch 01 to use realtime clock, that way we don't need to check the VCPU state. [Stefan] Added Eric's rev-by in 23. Change title to Null block driver in 3. [Eric] The second patch allows testing commit to a

Re: [Qemu-block] [PATCH v6 00/21] block: transactionless incremental backup series

2015-04-24 Thread Stefan Hajnoczi
On Fri, Apr 17, 2015 at 07:49:48PM -0400, John Snow wrote: It's spring! The winter snow has thawed and so here is a new patch series to enter your life and warm your heart. This patchset enables the in-memory part of the incremental backup feature, without transactional support. Support

Re: [Qemu-block] [PATCH COLO v3 01/14] docs: block replication's description

2015-04-23 Thread Stefan Hajnoczi
On Wed, Apr 22, 2015 at 05:28:01PM +0800, Wen Congyang wrote: On 04/22/2015 05:18 PM, Stefan Hajnoczi wrote: On Tue, Apr 21, 2015 at 05:28:01PM +0200, Paolo Bonzini wrote: On 21/04/2015 03:25, Wen Congyang wrote: Please do not introduce name+colo block drivers. This approach is invasive

Re: [Qemu-block] [PATCH] qcow2: do lazy allocation of the L2 cache

2015-04-23 Thread Stefan Hajnoczi
On Wed, Apr 22, 2015 at 04:37:15PM +0200, Alberto Garcia wrote: On Wed 22 Apr 2015 12:26:02 PM CEST, Stefan Hajnoczi wrote: Large disk images need large L2 caches in order to maximize their I/O performance. However setting a correct size for the cache is not necessarily easy since apart

Re: [Qemu-block] [PATCH v6 00/21] block: transactionless incremental backup series

2015-04-23 Thread Stefan Hajnoczi
On Fri, Apr 17, 2015 at 07:49:48PM -0400, John Snow wrote: === v6: === 01: s/underlaying/underlying/ Removed a reference to 'disabled' bitmaps. Touching up inconsistent list indentation. Added FreeBSD Documentation License, primarily to be difficult Please stick to the

Re: [Qemu-block] [PATCH v6 06/21] hbitmap: cache array lengths

2015-04-23 Thread Stefan Hajnoczi
with it. Reviewed-by: Max Reitz mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Signed-off-by: John Snow js...@redhat.com --- util/hbitmap.c | 4 1 file changed, 4 insertions(+) Reviewed-by: Stefan Hajnoczi stefa...@redhat.com pgpJFTFui6cyd.pgp Description: PGP signature

Re: [Qemu-block] [PATCH v6 15/21] block: Resize bitmaps on bdrv_truncate

2015-04-23 Thread Stefan Hajnoczi
insertions(+) Reviewed-by: Stefan Hajnoczi stefa...@redhat.com pgpqDBe_ud8NM.pgp Description: PGP signature

Re: [Qemu-block] [PATCH for-2.4 V2 0/9] various improvements for the iSCSI driver

2015-04-23 Thread Stefan Hajnoczi
On Thu, Apr 16, 2015 at 04:08:24PM +0200, Peter Lieven wrote: v1-v2: - removed the requirement for libiscsi 1.10.0 [Paolo] - reworked to force_next_flush logic [Paolo] Peter Lieven (9): block/iscsi: do not forget to logout from target block/iscsi: change all iscsilun properties

Re: [Qemu-block] [PATCH v2 0/4] Fix stop draining block jobs

2015-04-20 Thread Stefan Hajnoczi
On Fri, Apr 03, 2015 at 10:05:17PM +0800, Fam Zheng wrote: v2: Use pause approach as suggested by Paolo. Stopping the vm will drive the block job all the way to the end, because the sleep duration is too short, which means the block_job_sleep_ns in the block jobs are unhelpful. That is

Re: [Qemu-block] [PATCH v2 1/4] blockjob: Allow nested pause

2015-04-20 Thread Stefan Hajnoczi
On Fri, Apr 03, 2015 at 04:13:55PM +0200, Paolo Bonzini wrote: On 03/04/2015 16:05, Fam Zheng wrote: This patch changes block_job_pause to increase the pause counter and block_job_resume to decrease it. The counter will allow calling block_job_pause/block_job_resume unconditionally

Re: [Qemu-block] [Qemu-devel] [PATCH] block: avoid unnecessary bottom halves

2015-04-20 Thread Stefan Hajnoczi
On Sat, Mar 28, 2015 at 07:37:18AM +0100, Paolo Bonzini wrote: bdrv_aio_* APIs can use coroutines to achieve asynchronicity. However, the coroutine may terminate without having yielded back to the caller (for example because of something that invokes a nested event loop, or because the

Re: [Qemu-block] [PATCH COLO v3 01/14] docs: block replication's description

2015-04-20 Thread Stefan Hajnoczi
On Fri, Apr 03, 2015 at 06:01:07PM +0800, Wen Congyang wrote: Signed-off-by: Wen Congyang we...@cn.fujitsu.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Yang Hongyang yan...@cn.fujitsu.com Signed-off-by: zhanghailiang zhang.zhanghaili...@huawei.com Signed-off-by: Gonglei

Re: [Qemu-block] [PATCH] qmp: fill in the image field in BlockDeviceInfo

2015-04-22 Thread Stefan Hajnoczi
On Fri, Apr 17, 2015 at 02:52:43PM +0300, Alberto Garcia wrote: The image field in BlockDeviceInfo is supposed to contain an ImageInfo object. However that is being filled in by bdrv_query_info(), not by bdrv_block_device_info(), which is where BlockDeviceInfo is actually created. Anyone

Re: [Qemu-block] [PATCH] qcow2: do lazy allocation of the L2 cache

2015-04-22 Thread Stefan Hajnoczi
On Tue, Apr 21, 2015 at 06:20:39PM +0300, Alberto Garcia wrote: Large disk images need large L2 caches in order to maximize their I/O performance. However setting a correct size for the cache is not necessarily easy since apart from the image size, it also depends on other factors like its

Re: [Qemu-block] [PATCH COLO v3 01/14] docs: block replication's description

2015-04-22 Thread Stefan Hajnoczi
On Tue, Apr 21, 2015 at 05:28:01PM +0200, Paolo Bonzini wrote: On 21/04/2015 03:25, Wen Congyang wrote: Please do not introduce name+colo block drivers. This approach is invasive and makes block replication specific to only a few block drivers, e.g. NBD or qcow2. NBD is used to

Re: [Qemu-block] [PATCH COLO v3 01/14] docs: block replication's description

2015-04-22 Thread Stefan Hajnoczi
On Tue, Apr 21, 2015 at 09:25:59AM +0800, Wen Congyang wrote: On 04/20/2015 11:30 PM, Stefan Hajnoczi wrote: On Fri, Apr 03, 2015 at 06:01:07PM +0800, Wen Congyang wrote: One general question about the design: the Secondary host needs 3x storage space since it has the Secondary Disk, hidden

Re: [Qemu-block] [PATCH] MAINTAINERS: Add qemu-block list where missing

2015-05-01 Thread Stefan Hajnoczi
On Thu, Apr 30, 2015 at 03:15:50PM +0200, Kevin Wolf wrote: Signed-off-by: Kevin Wolf kw...@redhat.com --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) Reviewed-by: Stefan Hajnoczi stefa...@redhat.com pgptpJieZjiPO.pgp Description: PGP signature

Re: [Qemu-block] [Qemu-devel] Question about block driver

2015-04-30 Thread Stefan Hajnoczi
On Thu, Apr 30, 2015 at 11:52:01AM +0200, Kevin Wolf wrote: Am 30.04.2015 um 11:43 hat Wen Congyang geschrieben: On 04/30/2015 05:33 PM, Kevin Wolf wrote: [Cc: qemu-block] Am 30.04.2015 um 11:11 hat Wen Congyang geschrieben: Some drivers use bdrv_open, while the other dirvers use

Re: [Qemu-block] [PATCH COLO v3 01/14] docs: block replication's description

2015-04-30 Thread Stefan Hajnoczi
On Wed, Apr 29, 2015 at 04:37:49PM +0800, Gonglei wrote: On 2015/4/29 16:29, Paolo Bonzini wrote: On 27/04/2015 11:37, Stefan Hajnoczi wrote: But it's only for the failover case. Quorum (or a new block/colo.c driver or filter) is fine for normal colo operation. Perhaps

Re: [Qemu-block] [Qemu-devel] [RFC] Differential Backups

2015-05-06 Thread Stefan Hajnoczi
On Tue, May 05, 2015 at 11:55:49AM -0400, John Snow wrote: On 05/05/2015 06:25 AM, Stefan Hajnoczi wrote: On Wed, Apr 29, 2015 at 06:51:08PM -0400, John Snow wrote: This is a feature that should be very easy to add on top of the existing incremental feature, since it's just a difference in how

Re: [Qemu-block] [PATCH 3/7] qcow2: use an LRU algorithm to replace entries from the L2 cache

2015-05-07 Thread Stefan Hajnoczi
the cache independent from the position. Signed-off-by: Alberto Garcia be...@igalia.com --- block/qcow2-cache.c | 31 +++ 1 file changed, 15 insertions(+), 16 deletions(-) Reviewed-by: Stefan Hajnoczi stefa...@redhat.com pgpaKPHOt8X3o.pgp Description: PGP signature

Re: [Qemu-block] [Qemu-devel] [PATCH 6/7] qcow2: make qcow2_cache_put() a void function

2015-05-07 Thread Stefan Hajnoczi
-cluster.c | 50 ++ block/qcow2-refcount.c | 29 + block/qcow2.h | 2 +- 4 files changed, 17 insertions(+), 71 deletions(-) Reviewed-by: Stefan Hajnoczi stefa...@redhat.com pgp5d0sh16YYy.pgp Description: PGP

Re: [Qemu-block] [Qemu-devel] [PATCH 7/7] qcow2: style fixes in qcow2-cache.c

2015-05-07 Thread Stefan Hajnoczi
On Wed, May 06, 2015 at 04:39:31PM +0300, Alberto Garcia wrote: Fix pointer declaration to make it consistent with the rest of the code. Signed-off-by: Alberto Garcia be...@igalia.com --- block/qcow2-cache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Stefan

Re: [Qemu-block] [RFC PATCH 0/7] Fix transactional snapshot with virtio-blk dataplane

2015-05-08 Thread Stefan Hajnoczi
On Thu, May 07, 2015 at 02:43:43PM +0100, Stefan Hajnoczi wrote: On Wed, May 06, 2015 at 07:23:32PM +0800, Fam Zheng wrote: Reported by Paolo. Unlike the iohandler in main loop, iothreads currently process the event notifier used as virtio-blk ioeventfd in all nested aio_poll

Re: [Qemu-block] [PATCH COLO v3 01/14] docs: block replication's description

2015-05-08 Thread Stefan Hajnoczi
On Tue, May 05, 2015 at 04:23:56PM +0100, Dr. David Alan Gilbert wrote: * Stefan Hajnoczi (stefa...@redhat.com) wrote: On Fri, Apr 24, 2015 at 11:36:35AM +0200, Paolo Bonzini wrote: On 24/04/2015 11:38, Wen Congyang wrote: That can be done with drive-mirror. But I think

Re: [Qemu-block] [PATCH v2 0/6] block: Mirror discarded sectors

2015-05-07 Thread Stefan Hajnoczi
On Wed, May 06, 2015 at 12:52:02PM +0800, Fam Zheng wrote: v2: Fix typo and add Eric's rev-by in patch 3. Add patch 1 to discard target in mirror job. (Paolo) Add patch 6 to improve iotests.wait_ready. (John) This fixes the mirror assert failure reported by wangxiaolong:

Re: [Qemu-block] [Qemu-devel] [PATCH 6/6] qcow2: style fixes in qcow2-cache.c

2015-05-06 Thread Stefan Hajnoczi
-by: Stefan Hajnoczi stefa...@redhat.com pgpgiXMNuoEVo.pgp Description: PGP signature

Re: [Qemu-block] [PATCH v8 00/10] qcow2: Allow refcount_bits amendment

2015-05-11 Thread Stefan Hajnoczi
On Fri, Apr 24, 2015 at 05:00:18PM +0200, Max Reitz wrote: On 18.03.2015 21:56, Max Reitz wrote: This series adds support to qemu for changing the refcount_bits option of an existing qcow2 file through the qemu-img amend command. Originally (up until v7), this series was called qcow2:

Re: [Qemu-block] [Qemu-devel] [PATCH v3 01/10] qapi: Add transaction support to block-dirty-bitmap operations

2015-05-11 Thread Stefan Hajnoczi
On Fri, May 08, 2015 at 08:29:09AM -0600, Eric Blake wrote: On 05/08/2015 07:14 AM, Stefan Hajnoczi wrote: No it doesn't. Actions have to appear atomic to the qmp_transaction caller. Both approaches achieve that so they are both correct in isolation. The ambiguity is whether commit

Re: [Qemu-block] [PATCH v5 2/3] block: Fix NULL deference for unaligned write if qiov is NULL

2015-05-11 Thread Stefan Hajnoczi
On Tue, May 05, 2015 at 10:51:14AM +0800, Fam Zheng wrote: This function is complex. I had to draw a diagram to remember the relationships between the variables. It would be nice to split it if that can be done in a way that makes the code nicer. @@ -1236,13 +1238,39 @@ static int

Re: [Qemu-block] [Qemu-devel] [PATCH v5 3/3] qemu-iotests: Test unaligned sub-block zero write

2015-05-11 Thread Stefan Hajnoczi
, 43 insertions(+) Reviewed-by: Stefan Hajnoczi stefa...@redhat.com pgpmSqBydpbzm.pgp Description: PGP signature

Re: [Qemu-block] [Qemu-devel] [PATCH v3 01/10] qapi: Add transaction support to block-dirty-bitmap operations

2015-05-08 Thread Stefan Hajnoczi
On Thu, May 07, 2015 at 01:22:26PM -0400, John Snow wrote: On 05/07/2015 10:54 AM, Stefan Hajnoczi wrote: On Wed, Apr 22, 2015 at 08:04:44PM -0400, John Snow wrote: +static void block_dirty_bitmap_clear_prepare(BlkTransactionState *common

Re: [Qemu-block] [Qemu-devel] [PATCH 2/6] qcow2: simplify qcow2_cache_put() and qcow2_cache_entry_mark_dirty()

2015-05-06 Thread Stefan Hajnoczi
On Tue, May 05, 2015 at 03:06:52PM +0200, Alberto Garcia wrote: On Fri 01 May 2015 04:31:52 PM CEST, Stefan Hajnoczi wrote: int qcow2_cache_put(BlockDriverState *bs, Qcow2Cache *c, void **table) { -int i; +int i = (*table - c-table_array) / c-table_size; -for (i = 0

Re: [Qemu-block] [PATCH 1/6] qcow2: use one single memory block for the L2/refcount cache tables

2015-05-06 Thread Stefan Hajnoczi
On Tue, May 05, 2015 at 01:20:19PM +0200, Kevin Wolf wrote: Am 05.05.2015 um 12:28 hat Stefan Hajnoczi geschrieben: On Mon, May 04, 2015 at 12:58:13PM +0200, Kevin Wolf wrote: Am 01.05.2015 um 16:23 hat Stefan Hajnoczi geschrieben: On Thu, Apr 30, 2015 at 01:11:40PM +0300, Alberto Garcia

Re: [Qemu-block] [Qemu-devel] [PATCH v2 0/3] block: Warn about usage of growing formats over non-growable protocols

2015-05-05 Thread Stefan Hajnoczi
On Thu, Mar 19, 2015 at 03:03:18PM -0400, Max Reitz wrote: Some image formats (e.g. qcow2) require the underlying file to grow on write accesses, but this is in fact not supported by all protocols (e.g. nbd does not). If such a format requiring file growth is used non-read-only over a protocol

Re: [Qemu-block] [PATCH 2/7] qcow2: simplify qcow2_cache_put() and qcow2_cache_entry_mark_dirty()

2015-05-07 Thread Stefan Hajnoczi
-cache.c | 32 +++- 1 file changed, 15 insertions(+), 17 deletions(-) Reviewed-by: Stefan Hajnoczi stefa...@redhat.com pgpWU7F3fWhBP.pgp Description: PGP signature

Re: [Qemu-block] [PATCH v4 09/11] block: drive_backup transaction callback support

2015-05-18 Thread Stefan Hajnoczi
On Mon, May 11, 2015 at 07:04:24PM -0400, John Snow wrote: +static void drive_backup_cb(BlkActionState *common) +{ +BlkActionCallbackData *cb_data = common-cb_data; +BlockDriverState *bs = cb_data-opaque; +DriveBackupState *state = DO_UPCAST(DriveBackupState, common, common); +

Re: [Qemu-block] [PATCH v3 03/10] block: rename BlkTransactionState and BdrvActionOps

2015-05-18 Thread Stefan Hajnoczi
++--- 1 file changed, 64 insertions(+), 50 deletions(-) Reviewed-by: Stefan Hajnoczi stefa...@redhat.com pgpVXjVFZhugI.pgp Description: PGP signature

Re: [Qemu-block] [PATCH v2] qemu-iotests: Make debugging python tests easier

2015-05-18 Thread Stefan Hajnoczi
+--- tests/qemu-iotests/common | 6 ++ tests/qemu-iotests/iotests.py | 14 +++--- 3 files changed, 26 insertions(+), 6 deletions(-) Reviewed-by: Stefan Hajnoczi stefa...@redhat.com pgpOJOObGbm7T.pgp Description: PGP signature

Re: [Qemu-block] [PATCH v4 03/11] block: rename BlkTransactionState and BdrvActionOps

2015-05-18 Thread Stefan Hajnoczi
++--- 1 file changed, 65 insertions(+), 51 deletions(-) Reviewed-by: Stefan Hajnoczi stefa...@redhat.com pgpZHIJIf5eJm.pgp Description: PGP signature

Re: [Qemu-block] [PATCH v4 04/11] block: re-add BlkTransactionState

2015-05-18 Thread Stefan Hajnoczi
On Mon, May 11, 2015 at 07:04:19PM -0400, John Snow wrote: + * @jobs: A reference count that tracks how many jobs still need to complete. + * @actions: A list of all Actions in the Transaction. + */ +typedef struct BlkTransactionState { +int jobs; ... +static BlkTransactionState

Re: [Qemu-block] [PATCH v4 06/11] block: add refcount to Job object

2015-05-18 Thread Stefan Hajnoczi
On Mon, May 11, 2015 at 07:04:21PM -0400, John Snow wrote: If we want to get at the job after the life of the job, we'll need a refcount for this object. This may occur for example if we wish to inspect the actions taken by a particular job after a transactional group of jobs runs, and

Re: [Qemu-block] [PATCH v6 2/3] block: Fix NULL deference for unaligned write if qiov is NULL

2015-05-12 Thread Stefan Hajnoczi
On Tue, May 12, 2015 at 02:09:31PM +0800, Fam Zheng wrote: +static int coroutine_fn bdrv_co_do_zero_pwritev(BlockDriverState *bs, +int64_t offset, +unsigned int bytes, +

Re: [Qemu-block] [PATCH] block/mirror: Sleep periodically during bitmap scanning

2015-05-19 Thread Stefan Hajnoczi
On Wed, May 13, 2015 at 11:11:13AM +0800, Fam Zheng wrote: Before, we only yield after initializing dirty bitmap, where the QMP command would return. That may take very long, and guest IO will be blocked. Add sleep points like the later mirror iterations. Signed-off-by: Fam Zheng

Re: [Qemu-block] [PATCH v5 0/2] block: enforce minimal 4096 alignment in qemu_blockalign

2015-05-12 Thread Stefan Hajnoczi
On Mon, May 11, 2015 at 07:47:41PM +0300, Denis V. Lunev wrote: On 11/05/15 19:07, Denis V. Lunev wrote: On 11/05/15 18:08, Stefan Hajnoczi wrote: On Mon, May 04, 2015 at 04:42:22PM +0300, Denis V. Lunev wrote: The difference is quite reliable and the same 5%. qemu-io -n -c 'write -P 0xaa

Re: [Qemu-block] [PATCH] block/iscsi: handle zero events from iscsi_which_events

2015-04-09 Thread Stefan Hajnoczi
On Tue, Apr 7, 2015 at 9:08 PM, Peter Lieven p...@kamp.de wrote: newer libiscsi versions may return zero events from iscsi_which_events. In this case iscsi_service will return immediately without any progress. To avoid busy waiting for iscsi_which_events to change we deregister all read and

Re: [Qemu-block] [PATCH v2 2/4] block: Pause block jobs in bdrv_drain_all

2015-04-09 Thread Stefan Hajnoczi
On Wed, Apr 08, 2015 at 04:56:14PM +0200, Alberto Garcia wrote: On Wed, Apr 08, 2015 at 11:37:52AM +0100, Stefan Hajnoczi wrote: +QTAILQ_FOREACH(bs, bdrv_states, device_list) { +AioContext *aio_context = bdrv_get_aio_context(bs); + +aio_context_acquire

Re: [Qemu-block] [PATCH v4 15/20] block: Resize bitmaps on bdrv_truncate

2015-04-07 Thread Stefan Hajnoczi
On Thu, Apr 02, 2015 at 11:57:59AM -0400, John Snow wrote: On 04/02/2015 09:37 AM, Stefan Hajnoczi wrote: On Fri, Mar 20, 2015 at 03:16:58PM -0400, John Snow wrote: +void hbitmap_truncate(HBitmap *hb, uint64_t size) +{ +bool shrink; +unsigned i; +uint64_t num_elements = size

Re: [Qemu-block] [Qemu-devel] [PATCH v4 19/20] iotests: add simple incremental backup case

2015-04-07 Thread Stefan Hajnoczi
On Mon, Apr 06, 2015 at 05:49:10PM -0400, John Snow wrote: Is it really that unsafe? I could add in an explicit pause/resume barrier around the check if that would help inspire some confidence in the test. There are many cases where it happens to work, but we always tell users never to do this

Re: [Qemu-block] [PATCH v2 0/4] Fix stop draining block jobs

2015-04-08 Thread Stefan Hajnoczi
mode 100644 tests/qemu-iotests/129.out -- 2.1.0 Reviewed-by: Stefan Hajnoczi stefa...@redhat.com pgpAWzzsciyLJ.pgp Description: PGP signature

Re: [Qemu-block] [PATCH v2 2/4] block: Pause block jobs in bdrv_drain_all

2015-04-08 Thread Stefan Hajnoczi
On Fri, Apr 03, 2015 at 10:05:19PM +0800, Fam Zheng wrote: This is necessary to suppress more IO requests from being generated from block job coroutines. Signed-off-by: Fam Zheng f...@redhat.com --- block.c | 20 1 file changed, 20 insertions(+) diff --git

Re: [Qemu-block] [PATCH v2 1/4] blockjob: Allow nested pause

2015-04-08 Thread Stefan Hajnoczi
+-- include/block/blockjob.h | 20 4 files changed, 39 insertions(+), 14 deletions(-) Reviewed-by: Stefan Hajnoczi stefa...@redhat.com pgpBsT4XAbyNN.pgp Description: PGP signature

Re: [Qemu-block] [PATCH] block/iscsi: handle zero events from iscsi_which_events

2015-04-08 Thread Stefan Hajnoczi
On Tue, Apr 7, 2015 at 9:08 PM, Peter Lieven p...@kamp.de wrote: Please CC qemu-de...@nongnu.org in the future. All patches must be on the qemu-devel mailing list so they can be merged (for transparency). I have added qemu-devel to CC. +/* newer versions of libiscsi may return zero events.

Re: [Qemu-block] [PATCH for-2.3 v2] qcow2: Fix header update with overridden backing file

2015-04-08 Thread Stefan Hajnoczi
On Tue, Apr 07, 2015 at 03:03:16PM +0200, Kevin Wolf wrote: In recent qemu versions, it is possible to override the backing file name and format that is stored in the image file with values given at runtime. In such cases, the temporary override could end up in the image header if the qcow2

Re: [Qemu-block] [PATCH v4 17/20] iotests: add invalid input incremental backup tests

2015-04-02 Thread Stefan Hajnoczi
insertions(+) create mode 100644 tests/qemu-iotests/124 create mode 100644 tests/qemu-iotests/124.out Reviewed-by: Stefan Hajnoczi stefa...@redhat.com pgpPNDeHzWIuc.pgp Description: PGP signature

Re: [Qemu-block] [PATCH v4 16/20] hbitmap: truncate tests

2015-04-02 Thread Stefan Hajnoczi
+++ 1 file changed, 255 insertions(+) Reviewed-by: Stefan Hajnoczi stefa...@redhat.com pgpFUM67DfSiv.pgp Description: PGP signature

Re: [Qemu-block] [Qemu-devel] [PATCH v4 19/20] iotests: add simple incremental backup case

2015-04-02 Thread Stefan Hajnoczi
On Fri, Mar 20, 2015 at 03:17:02PM -0400, John Snow wrote: Signed-off-by: John Snow js...@redhat.com --- tests/qemu-iotests/124 | 153 + tests/qemu-iotests/124.out | 4 +- 2 files changed, 155 insertions(+), 2 deletions(-) diff --git

Re: [Qemu-block] [PATCH v4 20/20] iotests: add incremental backup failure recovery test

2015-04-02 Thread Stefan Hajnoczi
/124.out | 4 ++-- 3 files changed, 57 insertions(+), 3 deletions(-) Reviewed-by: Stefan Hajnoczi stefa...@redhat.com pgpf0n_345gpJ.pgp Description: PGP signature

Re: [Qemu-block] [PATCH v4 15/20] block: Resize bitmaps on bdrv_truncate

2015-04-02 Thread Stefan Hajnoczi
On Fri, Mar 20, 2015 at 03:16:58PM -0400, John Snow wrote: +void hbitmap_truncate(HBitmap *hb, uint64_t size) +{ +bool shrink; +unsigned i; +uint64_t num_elements = size; +uint64_t old; + +/* Size comes in as logical elements, adjust for granularity. */ +size =

Re: [Qemu-block] [PATCH v4 18/20] iotests: add QMP event waiting queue

2015-04-02 Thread Stefan Hajnoczi
On Fri, Mar 20, 2015 at 03:17:01PM -0400, John Snow wrote: +# Test if 'match' is a recursive subset of 'event' +def event_match(event, match = None): Not worth respinning but PEP8 says there should be no spaces around the '=' for keyword arguments:

Re: [Qemu-block] [PATCH v4 00/20] block: transactionless incremental backup series

2015-04-02 Thread Stefan Hajnoczi
On Fri, Mar 20, 2015 at 03:16:43PM -0400, John Snow wrote: I've run out of cheeky jokes for my cover letters. This patchset enables the in-memory part of the incremental backup feature, without transactional support. Support for transactions was separated into a separate series which is

Re: [Qemu-block] [Qemu-devel] [PATCH v3 04/13] netmap: Drop netmap_can_send

2015-05-19 Thread Stefan Hajnoczi
On Tue, May 19, 2015 at 10:51:01AM +, Fam Zheng wrote: This callback is called by main loop before polling s-fd, if it returns false, the fd will not be polled in this iteration. This is redundant with checks inside read callback. After this patch, the data will be copied from s-fd to

Re: [Qemu-block] [PATCH v3 02/13] qemu-nbd: Switch to qemu_set_fd_handler

2015-05-19 Thread Stefan Hajnoczi
-by: Fam Zheng f...@redhat.com Reviewed-by: Paolo Bonzini pbonz...@redhat.com --- qemu-nbd.c | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) Reviewed-by: Stefan Hajnoczi stefa...@redhat.com pgpXb1pMhlGi0.pgp Description: PGP signature

Re: [Qemu-block] [PATCH v3 03/13] l2tpv3: Drop l2tpv3_can_send

2015-05-19 Thread Stefan Hajnoczi
On Tue, May 19, 2015 at 10:51:00AM +, Fam Zheng wrote: This callback is called by main loop before polling s-fd, if it returns false, the fd will not be polled in this iteration. This is redundant with checks inside read callback. After this patch, the data will be copied from s-fd to

Re: [Qemu-block] [Qemu-devel] [PATCH v4 06/11] block: add refcount to Job object

2015-05-20 Thread Stefan Hajnoczi
On Tue, May 19, 2015 at 06:15:23PM -0400, John Snow wrote: On 05/18/2015 11:45 AM, Stefan Hajnoczi wrote: On Mon, May 11, 2015 at 07:04:21PM -0400, John Snow wrote: If we want to get at the job after the life of the job, we'll need a refcount for this object. This may occur for example

Re: [Qemu-block] [PATCH v3 00/13] main-loop: Get rid of fd_read_poll and qemu_set_fd_handler2

2015-05-20 Thread Stefan Hajnoczi
On Wed, May 20, 2015 at 8:39 AM, Paolo Bonzini pbonz...@redhat.com wrote: On 20/05/2015 08:38, Fam Zheng wrote: On Wed, 05/20 08:26, Paolo Bonzini wrote: On 19/05/2015 17:02, Stefan Hajnoczi wrote: 1. Convert everything like you converted qemu-nbd.c. This is a conservative approach and we

Re: [Qemu-block] [PATCH v5 01/10] qapi: Add transaction support to block-dirty-bitmap operations

2015-06-05 Thread Stefan Hajnoczi
(-) Reviewed-by: Stefan Hajnoczi stefa...@redhat.com pgp98EZOXbgWN.pgp Description: PGP signature

Re: [Qemu-block] [PATCH v5 06/10] block: add delayed bitmap successor cleanup

2015-06-05 Thread Stefan Hajnoczi
On Thu, Jun 04, 2015 at 05:46:08PM -0400, John Snow wrote: @@ -3190,19 +3193,13 @@ BdrvDirtyBitmap *bdrv_dirty_bitmap_abdicate(BlockDriverState *bs, * we may wish to re-join the parent and child/successor. * The merged parent will be un-frozen, but not explicitly re-enabled. */

Re: [Qemu-block] [PATCH v5 05/10] block: add transactional callbacks feature

2015-06-05 Thread Stefan Hajnoczi
On Thu, Jun 04, 2015 at 05:46:07PM -0400, John Snow wrote: The goal here is to add a new method to transactions that allows developers to specify a callback that will get invoked only once all jobs spawned by a transaction are completed, allowing developers the chance to perform actions

Re: [Qemu-block] [PATCH v2 0/2] block: driver should override flags in bdrv_open()

2015-06-09 Thread Stefan Hajnoczi
On Thu, Mar 19, 2015 at 6:53 PM, Max Reitz mre...@redhat.com wrote: BDRV_O_PROTOCOL is an internal qemu flag which a user should be able to override by explicitly specifying a block driver. This series implements this and adds two iotests (one for NBD, one for file) to test it. v2 (rebase on

Re: [Qemu-block] [Qemu-devel] [PATCH 1/2] block-backend: Introduce blk_drain() and replace blk_drain_all()

2015-06-08 Thread Stefan Hajnoczi
and replaces blk_drain_all() on it in virtio_blk_reset(). Cc: Christian Borntraeger borntrae...@de.ibm.com Cc: Cornelia Huck cornelia.h...@de.ibm.com Cc: Kevin Wolf kw...@redhat.com Cc: Paolo Bonzini pbonz...@redhat.com Cc: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Alexander Yarygin yary

Re: [Qemu-block] [PATCH v7 0/8] block: Mirror discarded sectors

2015-06-08 Thread Stefan Hajnoczi
On Mon, Jun 08, 2015 at 01:56:06PM +0800, Fam Zheng wrote: v7: Fix the lost assignment of s-unmap. v6: Fix pnum in bdrv_get_block_status_above. [Paolo] v5: Rewrite patch 1. Address Eric's comments on patch 3. Add Eric's rev-by to patches 2 4. Check BDRV_BLOCK_DATA in patch

Re: [Qemu-block] I/O accounting overhaul

2015-06-08 Thread Stefan Hajnoczi
On Wed, Jun 03, 2015 at 03:40:42PM +0200, Alberto Garcia wrote: Please structure the patches so that each statistic or group of statistics has its own patch. That will make it easy to review and possibly merge a subset if some of the statistics prove to be controversial. uint64_t

Re: [Qemu-block] [PATCH v8 0/8] Block Throttle Group Support

2015-06-03 Thread Stefan Hajnoczi
/block/throttle-groups.h -- 2.1.4 Reviewed-by: Stefan Hajnoczi stefa...@redhat.com pgptObrDMWto2.pgp Description: PGP signature

Re: [Qemu-block] [Qemu-devel] [PATCH 8/8] qemu-iotests: expand test 093 to support group throttling

2015-06-03 Thread Stefan Hajnoczi
On Fri, May 29, 2015 at 03:29:57PM +0200, Alberto Garcia wrote: On Fri 29 May 2015 02:32:45 PM CEST, Stefan Hajnoczi stefa...@gmail.com wrote: def setUp(self): -self.vm = iotests.VM().add_drive(self.test_img) +self.vm = iotests.VM() +for i in range(0

Re: [Qemu-block] [Qemu-devel] [PATCH v2 0/2] block: driver should override flags in bdrv_open()

2015-06-09 Thread Stefan Hajnoczi
On Tue, Jun 9, 2015 at 12:49 PM, Eric Blake ebl...@redhat.com wrote: On 06/09/2015 04:19 AM, Stefan Hajnoczi wrote: On Tue, Jun 09, 2015 at 10:59:42AM +0200, Kevin Wolf wrote: Am 09.06.2015 um 10:41 hat Stefan Hajnoczi geschrieben: On Thu, Mar 19, 2015 at 6:53 PM, Max Reitz mre...@redhat.com

Re: [Qemu-block] [PATCH] raw-posix: Fix .bdrv_co_get_block_status() for unaligned image size

2015-06-09 Thread Stefan Hajnoczi
On Tue, Jun 09, 2015 at 10:55:08AM +0200, Kevin Wolf wrote: Image files with an unaligned image size have a final hole that starts at EOF, i.e. in the middle of a sector. Currently, *pnum == 0 is returned when checking the status of this sector. In qemu-img, this triggers an assertion failure.

Re: [Qemu-block] [Qemu-devel] [PATCH COLO-Block v6 06/16] Don't allow a disk use backing reference target

2015-06-18 Thread Stefan Hajnoczi
On Thu, Jun 18, 2015 at 04:49:11PM +0800, Wen Congyang wrote: Signed-off-by: Wen Congyang we...@cn.fujitsu.com Signed-off-by: zhanghailiang zhang.zhanghaili...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- block.c | 9 + 1 file changed, 9 insertions(+) diff --git

Re: [Qemu-block] [Qemu-devel] [PATCH COLO-Block v6 13/16] quorum: implement block driver interfaces for block replication

2015-06-18 Thread Stefan Hajnoczi
On Thu, Jun 18, 2015 at 04:49:18PM +0800, Wen Congyang wrote: CCing Alberto Garcia for the quorum block driver. Signed-off-by: Wen Congyang we...@cn.fujitsu.com Signed-off-by: zhanghailiang zhang.zhanghaili...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- block/quorum.c |

Re: [Qemu-block] [PATCH COLO-Block v6 07/16] Add new block driver interface to connect/disconnect the remote target

2015-06-18 Thread Stefan Hajnoczi
On Thu, Jun 18, 2015 at 04:49:12PM +0800, Wen Congyang wrote: +void bdrv_connect(BlockDriverState *bs, Error **errp) +{ +BlockDriver *drv = bs-drv; + +if (drv drv-bdrv_connect) { +drv-bdrv_connect(bs, errp); +} else if (bs-file) { +bdrv_connect(bs-file, errp);

Re: [Qemu-block] [Qemu-devel] [PATCH COLO-Block v6 15/16] quorum: allow ignoring child errors

2015-06-18 Thread Stefan Hajnoczi
On Thu, Jun 18, 2015 at 04:49:20PM +0800, Wen Congyang wrote: CCing Alberto Garcia for the quorum block driver. If the child is not ready, read/write/getlength/flush will return -errno. It is not critical error, and can be ignored: 1. read/write: Just not report the error event. 2.

Re: [Qemu-block] [Qemu-devel] [PATCH v7 00/11] Support streaming to an intermediate layer

2015-06-22 Thread Stefan Hajnoczi
On Wed, May 13, 2015 at 04:27:30PM +0300, Alberto Garcia wrote: v7: - Rebased against the current master - Updated bdrv_drain_all() to use the new block_job_next() API. Please rebase onto https://github.com/stefanha/qemu 'block' branch and check that qemu-iotests 015 030 032 038 046 pass:

Re: [Qemu-block] [PATCH 00/16] ahci: ncq cleanup, part 1

2015-06-22 Thread Stefan Hajnoczi
On Fri, Jun 19, 2015 at 09:50:31PM -0400, John Snow wrote: requires: 1434470575-21625-1-git-send-email-js...@redhat.com [PATCH v2 0/4] ahci: misc fixes/tests for 2.4 This series adds a couple of tests to exercise the NCQ pathways and establish a baseline for us. Most of these

Re: [Qemu-block] [PATCH 08/16] ahci: clear error register before NCQ cmd

2015-06-23 Thread Stefan Hajnoczi
On Mon, Jun 22, 2015 at 05:51:10PM -0400, John Snow wrote: Or I'll just ignore this whole train of thought under the premise that every OS alive will always send an IDENTIFY packet first, and be on my way. Yes, it's not worth worrying about at this stage when guest OSes seem to be happy with

Re: [Qemu-block] [PATCH v8 00/11] Support streaming to an intermediate layer

2015-06-23 Thread Stefan Hajnoczi
On Tue, Jun 23, 2015 at 5:09 PM, Alberto Garcia be...@igalia.com wrote: On Tue 23 Jun 2015 05:36:32 PM CEST, Stefan Hajnoczi wrote: Did you try qemu-iotests? I'm still getting: 030 11s ... [failed, exit status 1] - output mismatch (see 030.out.bad) Yes, it works fine here. +Traceback

  1   2   3   4   5   6   7   8   9   10   >