Re: [Qemu-devel] [PATCH] qemu-img: let qemu-img behave as the manual advertise

2012-04-11 Thread Paolo Bonzini
Il 11/04/2012 04:42, Liu Yuan ha scritto: 1) if we use bdrv_close(), we rely on the assumption that backend storage will do flushing while interpreting this operation. This assumption might not always hold, for e.g, current sheepdog doesn't do flushing for bdrv_close(). So bdrv_flush() will

Re: [Qemu-devel] [PATCH] qemu-img: let qemu-img behave as the manual advertise

2012-04-11 Thread Kevin Wolf
Am 10.04.2012 20:10, schrieb Liu Yuan: From: Liu Yuan tailai...@taobao.com The 'qemu-img convert -h' advertise that the default cache mode is 'writeback', while in fact it is 'unsafe'. This patch 1) changes the cache mode as 'writeback' and 2) explicitly calls bdrv_flush() to flush the

Re: [Qemu-devel] [PATCH] qemu-img: let qemu-img behave as the manual advertise

2012-04-11 Thread Liu Yuan
On 04/11/2012 03:32 PM, Paolo Bonzini wrote: Il 11/04/2012 04:42, Liu Yuan ha scritto: 1) if we use bdrv_close(), we rely on the assumption that backend storage will do flushing while interpreting this operation. This assumption might not always hold, for e.g, current sheepdog doesn't do

Re: [Qemu-devel] [PATCH] qemu-img: let qemu-img behave as the manual advertise

2012-04-11 Thread Liu Yuan
On 04/11/2012 03:49 PM, Kevin Wolf wrote: I don't agree with this patch. If the documentation says that qemu-img always uses writeback, then the documentation must be fixed. We really don't care about flushes during an image conversion. It should just go as fast as it can. If any error

Re: [Qemu-devel] [PATCH] qemu-img: let qemu-img behave as the manual advertise

2012-04-11 Thread Kevin Wolf
Am 11.04.2012 12:05, schrieb Liu Yuan: On 04/11/2012 03:49 PM, Kevin Wolf wrote: I don't agree with this patch. If the documentation says that qemu-img always uses writeback, then the documentation must be fixed. We really don't care about flushes during an image conversion. It should just

Re: [Qemu-devel] [PATCH] qemu-img: let qemu-img behave as the manual advertise

2012-04-11 Thread Kevin Wolf
Am 11.04.2012 12:33, schrieb Kevin Wolf: Am 11.04.2012 12:05, schrieb Liu Yuan: On 04/11/2012 03:49 PM, Kevin Wolf wrote: I don't agree with this patch. If the documentation says that qemu-img always uses writeback, then the documentation must be fixed. We really don't care about flushes

Re: [Qemu-devel] [PATCH] qemu-img: let qemu-img behave as the manual advertise

2012-04-11 Thread Liu Yuan
On 04/11/2012 08:27 PM, Kevin Wolf wrote: Am 11.04.2012 12:33, schrieb Kevin Wolf: Am 11.04.2012 12:05, schrieb Liu Yuan: On 04/11/2012 03:49 PM, Kevin Wolf wrote: I don't agree with this patch. If the documentation says that qemu-img always uses writeback, then the documentation must be

Re: [Qemu-devel] [PATCH] qemu-img: let qemu-img behave as the manual advertise

2012-04-11 Thread Paolo Bonzini
Il 11/04/2012 11:58, Liu Yuan ha scritto: 2) explicit flushing is more maintainable, we don't need to guess if it does flushing internally if we use other function that flush implicitly. I think it is reasonable semantics that closing gets all data to storage. Yes, but if the buggy

Re: [Qemu-devel] [PATCH] qemu-img: let qemu-img behave as the manual advertise

2012-04-10 Thread Paolo Bonzini
Il 10/04/2012 20:10, Liu Yuan ha scritto: From: Liu Yuan tailai...@taobao.com The 'qemu-img convert -h' advertise that the default cache mode is 'writeback', while in fact it is 'unsafe'. This patch 1) changes the cache mode as 'writeback' and 2) explicitly calls bdrv_flush() to flush the

Re: [Qemu-devel] [PATCH] qemu-img: let qemu-img behave as the manual advertise

2012-04-10 Thread Liu Yuan
Hi Paolo, On 04/11/2012 03:40 AM, Paolo Bonzini wrote: From: Liu Yuan tailai...@taobao.com The 'qemu-img convert -h' advertise that the default cache mode is 'writeback', while in fact it is 'unsafe'. This patch 1) changes the cache mode as 'writeback' and 2) explicitly calls