Re: [Qemu-block] [Qemu-devel] [PATCH COLO v3 10/14] util/hbitmap: Add an API to reset all set bits in hbitmap

2015-05-07 Thread John Snow
On 05/06/2015 10:20 PM, Wen Congyang wrote: On 05/02/2015 12:47 AM, John Snow wrote: On 04/03/2015 07:05 AM, Paolo Bonzini wrote: On 03/04/2015 12:01, Wen Congyang wrote: Signed-off-by: Wen Congyang we...@cn.fujitsu.com Signed-off-by: zhanghailiang zhang.zhanghaili...@huawei.com

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

2015-05-07 Thread Stefan Hajnoczi
On Wed, May 06, 2015 at 04:39:27PM +0300, Alberto Garcia wrote: The current algorithm to evict entries from the cache gives always preference to those in the lowest positions. As the size of the cache increases, the chances of the later elements of being removed decrease exponentially. In a

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

2015-05-07 Thread Stefan Hajnoczi
On Wed, May 06, 2015 at 04:39:30PM +0300, Alberto Garcia wrote: This function never receives an invalid table pointer, so we can make it void and remove all the error checking code. Signed-off-by: Alberto Garcia be...@igalia.com --- block/qcow2-cache.c| 7 +--

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] [Qemu-devel] [PATCH v2 0/3] block: Warn about usage of growing formats over non-growable protocols

2015-05-07 Thread Paolo Bonzini
On 06/05/2015 19:23, Max Reitz wrote: The guest sees whatever has been written into reply-error, and that field hasn't been written by this function in that case. It has been written by nbd_receive_reply() in nbd.c, and that value comes directly from the server. In case of qemu-nbd being the

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

2015-05-07 Thread Fam Zheng
On Thu, 05/07 14:20, Stefan Hajnoczi wrote: 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

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 v2 0/3] block: Warn about usage of growing formats over non-growable protocols

2015-05-07 Thread Kevin Wolf
Am 07.05.2015 um 14:47 hat Paolo Bonzini geschrieben: On 07/05/2015 14:29, Kevin Wolf wrote: No, it shouldn't indeed. Could alloc_clusters_noref do bdrv_truncate and return ENOSPC if it fails? That's how for example qcow and vhdx work. vdi has the same problem. If you

Re: [Qemu-block] [Qemu-devel] [PATCH] nvme: support NVME_VOLATILE_WRITE_CACHE feature

2015-05-07 Thread Kevin Wolf
[ Cc: qemu-block ] Am 30.04.2015 um 16:03 hat Keith Busch geschrieben: On Thu, 30 Apr 2015, Christoph Hellwig wrote: The SCSI emulation in the Linux NVMe driver really wants to know if a device has a volatile write cache. Given that qemu has moved away from a model where we report the

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

2015-05-07 Thread Paolo Bonzini
On 07/05/2015 16:34, Kevin Wolf wrote: Am 07.05.2015 um 16:16 hat Paolo Bonzini geschrieben: On 07/05/2015 16:07, Kevin Wolf wrote: This is not right for two reasons: The first is that this is BlockBackend code I think it would take effect for the qemu-nbd case though. Oh, you want to

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

2015-05-07 Thread Alberto Garcia
On Thu 07 May 2015 04:55:21 PM CEST, Eric Blake wrote: /* Give the table some hits for the start so that it won't be replaced * immediately. The number 32 is completely arbitrary. */ -c-entries[i].cache_hits = 32; c-entries[i].offset = offset; The comment is now dead.

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

2015-05-07 Thread Eric Blake
On 05/06/2015 07:39 AM, Alberto Garcia wrote: The current algorithm to evict entries from the cache gives always preference to those in the lowest positions. As the size of the cache increases, the chances of the later elements of being removed decrease exponentially. In a scenario with

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

2015-05-07 Thread Kevin Wolf
Am 07.05.2015 um 16:16 hat Paolo Bonzini geschrieben: On 07/05/2015 16:07, Kevin Wolf wrote: This is not right for two reasons: The first is that this is BlockBackend code I think it would take effect for the qemu-nbd case though. Oh, you want to change the server code rather than the

[Qemu-block] [PATCH v4] block/vdi: Use bdrv_flush after metadata updates

2015-05-07 Thread Zhe Qiu
In reference to b0ad5a45...078a458e, metadata writes to qcow2/cow/qcow/vpc/vmdk are all synced prior to succeeding writes. Only when write is successful that bdrv_flush is called. Signed-off-by: Zhe Qiu phoea...@gmail.com --- block/vdi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

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

2015-05-07 Thread Stefan Hajnoczi
On Wed, May 06, 2015 at 04:39:26PM +0300, Alberto Garcia wrote: Since all tables are now stored together, it is possible to obtain the position of a particular table directly from its address, so the operation becomes O(1). Signed-off-by: Alberto Garcia be...@igalia.com ---

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

2015-05-07 Thread Kevin Wolf
Am 07.05.2015 um 14:20 hat Paolo Bonzini geschrieben: On 06/05/2015 19:23, Max Reitz wrote: The guest sees whatever has been written into reply-error, and that field hasn't been written by this function in that case. It has been written by nbd_receive_reply() in nbd.c, and that value

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

2015-05-07 Thread John Snow
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, + Error **errp) +{ +BlockDirtyBitmapState *state =