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] [PATCH] block: Document blockdev-add's immaturity

2015-03-25 Thread Stefan Hajnoczi
On Fri, Mar 20, 2015 at 02:32:17PM +0100, Markus Armbruster wrote: Signed-off-by: Markus Armbruster arm...@redhat.com --- qapi/block-core.json | 4 qmp-commands.hx | 4 2 files changed, 8 insertions(+) Thanks, applied to my block tree:

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 04/20] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove

2015-04-02 Thread Stefan Hajnoczi
deletions(-) Reviewed-by: Stefan Hajnoczi stefa...@redhat.com pgpFyJ5OmEUcr.pgp Description: PGP signature

Re: [Qemu-block] [PATCH v4 09/20] block: Add bitmap successors

2015-04-02 Thread Stefan Hajnoczi
| 104 +- blockdev.c| 7 include/block/block.h | 10 + qapi/block-core.json | 1 + 4 files changed, 121 insertions(+), 1 deletion(-) Reviewed-by: Stefan Hajnoczi stefa...@redhat.com pgpGiSTeygprV.pgp Description

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 18/21] iotests: add QMP event waiting queue

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

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] [Question] the problem about driver-mirror

2015-04-23 Thread Stefan Hajnoczi
On Thu, Apr 23, 2015 at 5:51 PM, 张敏 rudyflyzh...@gmail.com wrote: I test the function of driver-mirror when run io stress test in vm. The fio's model is 128 iodepth, 4K block-size, 100% write, 100% randon. This is a continuous test, and then I start drive-mirror to copy data to other image

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 v4 0/3] Add bdrv_get_device_or_node_name()

2015-04-21 Thread Stefan Hajnoczi
On Wed, Apr 08, 2015 at 12:29:17PM +0300, Alberto Garcia wrote: This series contains a couple of minor changes suggested by Markus in the previous one. I removed the Reviewed-by line by Max in the modified patch even if the changes are small, hope that's ok. v4: - Fix documentation of the

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

2015-04-21 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 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] qcow2: do lazy allocation of the L2 cache

2015-04-24 Thread Stefan Hajnoczi
On Fri, Apr 24, 2015 at 12:10 PM, Alberto Garcia be...@igalia.com wrote: On Fri 24 Apr 2015 11:52:14 AM CEST, Kevin Wolf kw...@redhat.com wrote: The posix_memalign() call wastes memory. I compared: posix_memalign(memptr, 65536, 2560 * 65536); memset(memptr, 0, 2560 * 65536); with:

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] [Qemu-devel] [PATCH v6 07/21] hbitmap: add hbitmap_merge

2015-04-23 Thread Stefan Hajnoczi
...@redhat.com --- include/qemu/hbitmap.h | 13 + util/hbitmap.c | 33 + 2 files changed, 46 insertions(+) Reviewed-by: Stefan Hajnoczi stefa...@redhat.com pgpWRAsmJzSME.pgp Description: PGP signature

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 10/21] qmp: Add support of dirty-bitmap sync mode for drive-backup

2015-04-23 Thread Stefan Hajnoczi
| 3 +- include/block/block.h | 1 + include/block/block_int.h | 2 + qapi/block-core.json | 14 +++-- qmp-commands.hx | 8 ++- 9 files changed, 181 insertions(+), 33 deletions(-) Reviewed-by: Stefan Hajnoczi stefa...@redhat.com pgpvCVNw3laVq.pgp Description

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] [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 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] [PATCH 2/6] qcow2: simplify qcow2_cache_put() and qcow2_cache_entry_mark_dirty()

2015-05-01 Thread Stefan Hajnoczi
On Thu, Apr 30, 2015 at 01:11:41PM +0300, Alberto Garcia 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; i c-size; i++) { -if (table_addr(c, i) == *table) { -

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 5/7] qcow2: use a hash to look for entries in the L2 cache

2015-05-07 Thread Stefan Hajnoczi
of comparisons per lookup from 430 to 2.5. Signed-off-by: Alberto Garcia be...@igalia.com --- block/qcow2-cache.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) Reviewed-by: Stefan Hajnoczi stefa...@redhat.com pgpG1ojEViTlo.pgp Description: PGP signature

Re: [Qemu-block] [Qemu-devel] [PATCH 4/7] qcow2: remove qcow2_cache_find_entry_to_replace()

2015-05-07 Thread Stefan Hajnoczi
be...@igalia.com --- block/qcow2-cache.c | 45 - 1 file changed, 16 insertions(+), 29 deletions(-) Reviewed-by: Stefan Hajnoczi stefa...@redhat.com pgp_3ONWe6Mz4.pgp Description: PGP signature

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 v3] block/vdi: Use bdrv_flush after metadata updates

2015-05-07 Thread Stefan Hajnoczi
On Thu, May 07, 2015 at 12:04:56PM +0800, Zhe Qiu wrote: From: phoeagon phoea...@gmail.com In reference to b0ad5a455d7e5352d4c86ba945112011dbeadfb8~078a458e077d6b0db262c4b05fee51d01de2d1d2, metadata writes to qcow2/cow/qcow/vpc/vmdk are all synced prior to succeeding writes. Only when

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] [RFC PATCH 0/7] Fix transactional snapshot with virtio-blk dataplane

2015-05-07 Thread Stefan Hajnoczi
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. This is dangerous without proper protection, because guest requests could

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 0/6] qcow2 L2/refcount cache improvements

2015-05-06 Thread Stefan Hajnoczi
On Thu, Apr 30, 2015 at 01:11:39PM +0300, Alberto Garcia wrote: Here are some improvements to the qcow2 L2/refcount cache code. The first one is that all cache tables are now allocated using a single memory block, as we discussed last week. Apart from a more efficient use of memory, this

Re: [Qemu-block] [PATCH 5/6] qcow2: use a hash to look for entries in the L2 cache

2015-05-06 Thread Stefan Hajnoczi
On Thu, Apr 30, 2015 at 01:11:44PM +0300, Alberto Garcia wrote: By using a hash of the offset as the starting point, lookups are faster and independent from the array size. The hash is computed using the cluster number of the table, multiplied by 4 to make it perform better when there are

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 v8 10/10] iotests: Extend test 112 for qemu-img amend

2015-05-11 Thread Stefan Hajnoczi
+ tests/qemu-iotests/112.out | 71 + 2 files changed, 180 insertions(+) Reviewed-by: Stefan Hajnoczi stefa...@redhat.com pgp8Z96rSJG2f.pgp Description: PGP signature

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] [PATCH v5 1/3] Revert block: Fix unaligned zero write

2015-05-11 Thread Stefan Hajnoczi
is manually reverted. Signed-off-by: Fam Zheng f...@redhat.com --- block/io.c | 45 ++--- 1 file changed, 6 insertions(+), 39 deletions(-) Reviewed-by: Stefan Hajnoczi stefa...@redhat.com pgpKw3rGhG3xB.pgp Description: PGP signature

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] [PATCH v3 01/10] qapi: Add transaction support to block-dirty-bitmap operations

2015-05-07 Thread Stefan Hajnoczi
On Wed, Apr 22, 2015 at 08:04:44PM -0400, John Snow wrote: +static void block_dirty_bitmap_clear_prepare(BlkTransactionState *common, + Error **errp) +{ +BlockDirtyBitmapState *state = DO_UPCAST(BlockDirtyBitmapState, +

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] [Qemu-devel] [PATCH 1/7] qcow2: use one single memory block for the L2/refcount cache tables

2015-05-07 Thread Stefan Hajnoczi
be...@igalia.com --- block/qcow2-cache.c| 55 -- block/qcow2-cluster.c | 12 +-- block/qcow2-refcount.c | 8 +--- block/qcow2.h | 3 ++- 4 files changed, 39 insertions(+), 39 deletions(-) Reviewed-by: Stefan Hajnoczi stefa

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 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: @@ -1825,6 +1827,19 @@ static void drive_backup_prepare(BlkActionState *common, Error **errp) } bs = blk_bs(blk); +/* BackupBlockJob is opaque to us, so look up the bitmap ourselves */ +if (backup-has_bitmap) {

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 v8 0/2] block: enforce minimal 4096 alignment in qemu_blockalign

2015-05-13 Thread Stefan Hajnoczi
- reduces 10% to 5% in patch description to better fit 180 vs 189 difference Signed-off-by: Denis V. Lunev d...@openvz.org CC: Paolo Bonzini pbonz...@redhat.com CC: Kevin Wolf kw...@redhat.com CC: Stefan Hajnoczi stefa...@redhat.com Thanks, applied to my block tree: https://github.com

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 v7 2/3] block: Fix NULL deference for unaligned write if qiov is NULL

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

Re: [Qemu-block] [PATCH v7 0/3] block: Fix unaligned bdrv_aio_write_zeroes

2015-05-18 Thread Stefan Hajnoczi
On Wed, May 13, 2015 at 01:11:58PM +, Fam Zheng wrote: v7: Add Kevin's rev-by in patch 1 and 3. Address Stefan's and Kevin's comments on patch 2: - Don't duplicate tracked_request_begin and tracked_request_end; - Don't forget to remove debug printf; - Call qemu_vfree

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 v5 15/21] block: Resize bitmaps on bdrv_truncate

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

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 15/20] block: Resize bitmaps on bdrv_truncate

2015-04-08 Thread Stefan Hajnoczi
On Tue, Apr 07, 2015 at 12:45:30PM -0400, John Snow wrote: On 04/07/2015 08:57 AM, Stefan Hajnoczi wrote: 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

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

2015-04-08 Thread Stefan Hajnoczi
On Wed, Apr 8, 2015 at 6:08 PM, ronnie sahlberg ronniesahlb...@gmail.com wrote: The nice part with the current patch of Peter is that qemu and libiscsi can be upgraded/downgraded independently. That's fine for avoiding hassles for existing apps, like QEMU, and I'm happy to merge the patch. For

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

  1   2   3   4   5   6   7   8   9   10   >