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. >> > > > Y

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 document

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

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 sho

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 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

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 > > 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 dirty bits. > >

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() wil

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 >> > >> > 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_f

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 > > 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 dirty bits. >

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

2012-04-10 Thread Liu Yuan
From: Liu Yuan 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 dirty bits. 2) is needed because some backend storage doesn't have a