On Fri, Nov 07, 2014 at 09:30:59AM +0800, Zhang Haoyu wrote:
> Needless to call bdrv_flush() in qcow2_cache_flush()
> if no cache entry is dirty.

Did you audit all qcow2 cache callers to make sure they don't rely on
the cache flush?

Maybe it's not safe to optimize it away if callers assume previously
written data will be persisted as part of qcow2 cache flushing.

We need to be very careful when optimizing out cache flushes so that we
don't introduce data integrity problems.

> 
> Signed-off-by: Zhang Haoyu <[email protected]>
> ---
>  block/qcow2-cache.c | 24 +++++++++++++-----------
>  1 file changed, 13 insertions(+), 11 deletions(-)

Please post benchmark configuration and performance results, if you ran
any.  Data makes performance optimization patches much more convincing.

Attachment: pgpnjgYEr1VlV.pgp
Description: PGP signature

Reply via email to