Re: [Qemu-block] [Qemu-stable] [PATCH v5 3/8] mirror: Do zero write on target if sectors not allocated

2015-05-26 Thread Fam Zheng
On Tue, 05/26 07:53, Peter Lieven wrote: Am 26.05.2015 um 05:36 schrieb Fam Zheng: If guest discards a source cluster, mirroring with bdrv_aio_readv is overkill. Some protocols do zero upon discard, where it's best to use bdrv_aio_write_zeroes, otherwise, bdrv_aio_discard will be enough.

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

2015-05-26 Thread Fam Zheng
On Tue, 05/19 15:48, Stefan Hajnoczi wrote: 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

Re: [Qemu-block] RFC block/iscsi command timeout

2015-05-26 Thread Kevin Wolf
Am 22.05.2015 um 09:30 hat Peter Lieven geschrieben: Hi, next libiscsi version will allow to define command timeouts. At least for sync commands this was in fact possible since somewhen in 2013. Per default this timeout is disabled. I would like to at least define a timeout for the

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

2015-05-26 Thread Stefan Hajnoczi
On Mon, May 25, 2015 at 11:51:23AM +0800, Fam Zheng wrote: On Tue, 05/19 15:54, Stefan Hajnoczi wrote: 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.

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

2015-05-26 Thread Stefan Hajnoczi
On Tue, May 26, 2015 at 02:52:48PM +0800, Fam Zheng wrote: On Tue, 05/19 15:48, Stefan Hajnoczi wrote: 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.

Re: [Qemu-block] RFC block/iscsi command timeout

2015-05-26 Thread Peter Lieven
Am 22.05.2015 um 14:22 schrieb ronnie sahlberg: On Fri, May 22, 2015 at 12:30 AM, Peter Lieven p...@kamp.de mailto:p...@kamp.de wrote: Hi, next libiscsi version will allow to define command timeouts. At least for sync commands this was in fact possible since somewhen in 2013.

Re: [Qemu-block] [PATCH] MAINTAINERS: Add header files to Block Layer Core section

2015-05-26 Thread Stefan Hajnoczi
On Wed, May 20, 2015 at 12:05:55PM +0200, Kevin Wolf wrote: Suggested-by: Markus Armbruster arm...@redhat.com Signed-off-by: Kevin Wolf kw...@redhat.com --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) Reviewed-by: Stefan Hajnoczi stefa...@redhat.com pgpDxpVWxyTO2.pgp Description:

Re: [Qemu-block] RFC block/iscsi command timeout

2015-05-26 Thread Kevin Wolf
Am 26.05.2015 um 11:30 hat Peter Lieven geschrieben: Am 26.05.2015 um 11:01 schrieb Kevin Wolf: Am 22.05.2015 um 09:30 hat Peter Lieven geschrieben: Hi, next libiscsi version will allow to define command timeouts. At least for sync commands this was in fact possible since somewhen in

Re: [Qemu-block] RFC block/iscsi command timeout

2015-05-26 Thread Paolo Bonzini
On 26/05/2015 11:37, Kevin Wolf wrote: If we run into a timeout we theoretically have the following options: - reconnect - retry - error I would reconnect as Ronnie proposed. Just trying to reconnect indefinitely might not be the best option. Consider the situation where

Re: [Qemu-block] RFC block/iscsi command timeout

2015-05-26 Thread Kevin Wolf
Am 26.05.2015 um 11:44 hat Paolo Bonzini geschrieben: On 26/05/2015 11:37, Kevin Wolf wrote: If we run into a timeout we theoretically have the following options: - reconnect - retry - error I would reconnect as Ronnie proposed. Just trying to reconnect indefinitely

Re: [Qemu-block] [PATCH] iotests: remove assertIsNotNone call

2015-05-26 Thread Stefan Hajnoczi
On Fri, May 22, 2015 at 12:01:41PM -0400, John Snow wrote: RHEL6 doesn't have Python 2.7, so replace this call with assertNotEqual(x, None) which will work just as well. Reported-by: Kevin Wolf kw...@redhat.com Signed-off-by: John Snow js...@redhat.com --- tests/qemu-iotests/124 | 2 +-

Re: [Qemu-block] RFC block/iscsi command timeout

2015-05-26 Thread Peter Lieven
Am 26.05.2015 um 11:01 schrieb Kevin Wolf: Am 22.05.2015 um 09:30 hat Peter Lieven geschrieben: Hi, next libiscsi version will allow to define command timeouts. At least for sync commands this was in fact possible since somewhen in 2013. Per default this timeout is disabled. I would like to

Re: [Qemu-block] [PATCH v5 1/8] block: Add bdrv_get_block_status_above

2015-05-26 Thread Fam Zheng
On Tue, 05/26 11:22, Paolo Bonzini wrote: On 26/05/2015 05:36, Fam Zheng wrote: Like bdrv_is_allocated_above, this function follows the backing chain until seeing BDRV_BLOCK_ALLOCATED. Base is not included. Reimplement bdrv_is_allocated on top. Signed-off-by: Fam Zheng

Re: [Qemu-block] [Qemu-devel] [PULL 00/22] Block layer core and image format patches

2015-05-26 Thread Peter Maydell
On 22 May 2015 at 16:26, Kevin Wolf kw...@redhat.com wrote: The following changes since commit 8b6db32a4ec47d1171ccfa21d557096b99f4eef0: Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging (2015-05-22 13:25:40 +0100) are available in the git repository at:

Re: [Qemu-block] [PATCH] iotests: remove assertIsNotNone call

2015-05-26 Thread Kevin Wolf
Am 22.05.2015 um 18:01 hat John Snow geschrieben: RHEL6 doesn't have Python 2.7, so replace this call with assertNotEqual(x, None) which will work just as well. Reported-by: Kevin Wolf kw...@redhat.com Signed-off-by: John Snow js...@redhat.com Thanks, applied to the block branch. Kevin

Re: [Qemu-block] [PATCH] qemu-iotests: Fix 128 if sudo required

2015-05-26 Thread Kevin Wolf
Am 19.05.2015 um 12:46 hat Fam Zheng geschrieben: If passwordless sudo works, use it in the qemu-io cmd. Signed-off-by: Fam Zheng f...@redhat.com Thanks, applied to the block branch. Kevin

Re: [Qemu-block] [PATCH 2/3] qcow2: add option to clean unused cache entries after some time

2015-05-26 Thread Eric Blake
On 05/26/2015 11:14 AM, Alberto Garcia wrote: This adds a new 'cache-clean-interval' option that cleans all qcow2 cache entries that haven't been used in a certain interval, given in seconds. This allows setting a large L2 cache size so it can handle scenarios with lots of I/O and at the

Re: [Qemu-block] [PATCH 3/3] qcow2: reorder fields in Qcow2CachedTable to reduce padding

2015-05-26 Thread Max Reitz
On 26.05.2015 18:12, Eric Blake wrote: On 05/26/2015 10:10 AM, Max Reitz wrote: On 18.05.2015 18:48, Alberto Garcia wrote: Changing the current ordering saves 8 bytes per cache entry in x86_64. Hm, not seven? Signed-off-by: Alberto Garcia be...@igalia.com --- block/qcow2-cache.c | 2 +-

Re: [Qemu-block] [PATCH 3/3] qcow2: reorder fields in Qcow2CachedTable to reduce padding

2015-05-26 Thread Alberto Garcia
On Tue 26 May 2015 06:10:11 PM CEST, Max Reitz wrote: On 18.05.2015 18:48, Alberto Garcia wrote: Changing the current ordering saves 8 bytes per cache entry in x86_64. Hm, not seven? No, the size is 32 before the patch and 24 afterwards. What you save is the 7 bytes of padding after 'dirty'

Re: [Qemu-block] [PATCH 3/3] qcow2: reorder fields in Qcow2CachedTable to reduce padding

2015-05-26 Thread Eric Blake
On 05/18/2015 10:48 AM, Alberto Garcia wrote: Changing the current ordering saves 8 bytes per cache entry in x86_64. Signed-off-by: Alberto Garcia be...@igalia.com --- block/qcow2-cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Eric Blake ebl...@redhat.com --

Re: [Qemu-block] [PATCH 1/3] qcow2: mark the memory as no longer needed after qcow2_cache_empty()

2015-05-26 Thread Alberto Garcia
On Tue 26 May 2015 05:39:12 PM CEST, Max Reitz mre...@redhat.com wrote: After having emptied the cache, the data in the cache tables is no longer useful, so we can tell the kernel that we are done with it. In Linux this frees the resources associated with it. Looks good, but by applying the

Re: [Qemu-block] [PATCH 1/3] qcow2: mark the memory as no longer needed after qcow2_cache_empty()

2015-05-26 Thread Max Reitz
On 26.05.2015 17:51, Alberto Garcia wrote: On Tue 26 May 2015 05:39:12 PM CEST, Max Reitz mre...@redhat.com wrote: After having emptied the cache, the data in the cache tables is no longer useful, so we can tell the kernel that we are done with it. In Linux this frees the resources associated

Re: [Qemu-block] [PATCH v6 01/13] block: Add op blocker type device IO

2015-05-26 Thread Max Reitz
On 26.05.2015 16:22, Kevin Wolf wrote: Am 21.05.2015 um 08:42 hat Fam Zheng geschrieben: It blocks device IO. What I'm missing here is a description of the case that it protects against. Blocking device I/O doesn't sound like a valid thing to want per se, but it might be true that we need it

Re: [Qemu-block] [PATCH 2/3] qcow2: add option to clean unused cache entries after some time

2015-05-26 Thread Alberto Garcia
On Tue 26 May 2015 08:52:41 PM CEST, Eric Blake ebl...@redhat.com wrote: +# @cache-clean-interval: #optional clean unused entries in the L2 and refcount +# caches. The interval is in seconds (since 2.4) +# # Since: 1.7 Is there any QMP command that can query the

Re: [Qemu-block] [PATCH 2/3] qcow2: add option to clean unused cache entries after some time

2015-05-26 Thread Eric Blake
On 05/26/2015 01:10 PM, Alberto Garcia wrote: On Tue 26 May 2015 08:52:41 PM CEST, Eric Blake ebl...@redhat.com wrote: +# @cache-clean-interval: #optional clean unused entries in the L2 and refcount +# caches. The interval is in seconds (since 2.4) +# # Since:

Re: [Qemu-block] [PATCH v6 01/13] block: Add op blocker type device IO

2015-05-26 Thread Kevin Wolf
Am 21.05.2015 um 08:42 hat Fam Zheng geschrieben: It blocks device IO. What I'm missing here is a description of the case that it protects against. Blocking device I/O doesn't sound like a valid thing to want per se, but it might be true that we need it as long as we don't have the real op

Re: [Qemu-block] [PATCH 3/3] qcow2: reorder fields in Qcow2CachedTable to reduce padding

2015-05-26 Thread Eric Blake
On 05/26/2015 10:10 AM, Max Reitz wrote: On 18.05.2015 18:48, Alberto Garcia wrote: Changing the current ordering saves 8 bytes per cache entry in x86_64. Hm, not seven? Signed-off-by: Alberto Garcia be...@igalia.com --- block/qcow2-cache.c | 2 +- 1 file changed, 1 insertion(+), 1

[Qemu-block] [PATCH 3/3] qcow2: reorder fields in Qcow2CachedTable to reduce padding

2015-05-26 Thread Alberto Garcia
Changing the current ordering saves 8 bytes per cache entry in x86_64. Signed-off-by: Alberto Garcia be...@igalia.com Reviewed-by: Max Reitz mre...@redhat.com --- block/qcow2-cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/qcow2-cache.c b/block/qcow2-cache.c

Re: [Qemu-block] [PATCH 2/3] qcow2: add option to clean unused cache entries after some time

2015-05-26 Thread Max Reitz
On 18.05.2015 18:48, Alberto Garcia wrote: This adds a new 'cache-clean-interval' option that cleans all qcow2 cache entries that haven't been used in a certain interval, given in seconds. This allows setting a large L2 cache size so it can handle scenarios with lots of I/O and at the same time

[Qemu-block] [PATCH v2 0/3] Clean unused entries in the qcow2 L2/refcount cache

2015-05-26 Thread Alberto Garcia
New version of the series. v2: - Clarify that the block-commit mentioned in the first patch refers to the HMP commit command. - Check the value of cache_clean_interval and cast it accordingly to prevent it from overflowing. v1:

[Qemu-block] [PATCH 1/3] qcow2: mark the memory as no longer needed after qcow2_cache_empty()

2015-05-26 Thread Alberto Garcia
After having emptied the cache, the data in the cache tables is no longer useful, so we can tell the kernel that we are done with it. In Linux this frees the resources associated with it. The effect of this can be seen in the HMP commit operation: it moves data from the top to the base image (and

Re: [Qemu-block] [PATCH 2/3] qcow2: add option to clean unused cache entries after some time

2015-05-26 Thread Max Reitz
On 26.05.2015 19:14, Alberto Garcia wrote: This adds a new 'cache-clean-interval' option that cleans all qcow2 cache entries that haven't been used in a certain interval, given in seconds. This allows setting a large L2 cache size so it can handle scenarios with lots of I/O and at the same time