Re: [Qemu-devel] [PATCH] qcow2: allocate cluster_cache/cluster_data on demand

2017-08-30 Thread Alexey Kardashevskiy
On 31/08/17 03:20, Stefan Hajnoczi wrote: > On Tue, Aug 22, 2017 at 02:56:00PM +1000, Alexey Kardashevskiy wrote: >> On 19/08/17 12:46, Alexey Kardashevskiy wrote: >>> On 19/08/17 01:18, Eric Blake wrote: On 08/18/2017 08:31 AM, Stefan Hajnoczi wrote: > Most qcow2 files are uncompressed so

Re: [Qemu-devel] [PATCH] qcow2: allocate cluster_cache/cluster_data on demand

2017-08-30 Thread Stefan Hajnoczi
On Tue, Aug 22, 2017 at 02:56:00PM +1000, Alexey Kardashevskiy wrote: > On 19/08/17 12:46, Alexey Kardashevskiy wrote: > > On 19/08/17 01:18, Eric Blake wrote: > >> On 08/18/2017 08:31 AM, Stefan Hajnoczi wrote: > >>> Most qcow2 files are uncompressed so it is wasteful to allocate (32 + 1) > >>> *

Re: [Qemu-devel] [PATCH] qcow2: allocate cluster_cache/cluster_data on demand

2017-08-21 Thread Alexey Kardashevskiy
On 19/08/17 12:46, Alexey Kardashevskiy wrote: > On 19/08/17 01:18, Eric Blake wrote: >> On 08/18/2017 08:31 AM, Stefan Hajnoczi wrote: >>> Most qcow2 files are uncompressed so it is wasteful to allocate (32 + 1) >>> * cluster_size + 512 bytes upfront. Allocate s->cluster_cache and >>> s->cluster_

Re: [Qemu-devel] [PATCH] qcow2: allocate cluster_cache/cluster_data on demand

2017-08-21 Thread Stefan Hajnoczi
On Fri, Aug 18, 2017 at 10:18:37AM -0500, Eric Blake wrote: > On 08/18/2017 08:31 AM, Stefan Hajnoczi wrote: > > Most qcow2 files are uncompressed so it is wasteful to allocate (32 + 1) > > * cluster_size + 512 bytes upfront. Allocate s->cluster_cache and > > s->cluster_data when the first read op

Re: [Qemu-devel] [PATCH] qcow2: allocate cluster_cache/cluster_data on demand

2017-08-19 Thread Alexey Kardashevskiy
On 19/08/17 12:53, Alexey Kardashevskiy wrote: > On 19/08/17 12:46, Alexey Kardashevskiy wrote: >> On 19/08/17 01:18, Eric Blake wrote: >>> On 08/18/2017 08:31 AM, Stefan Hajnoczi wrote: Most qcow2 files are uncompressed so it is wasteful to allocate (32 + 1) * cluster_size + 512 bytes up

Re: [Qemu-devel] [PATCH] qcow2: allocate cluster_cache/cluster_data on demand

2017-08-18 Thread Alexey Kardashevskiy
On 19/08/17 12:46, Alexey Kardashevskiy wrote: > On 19/08/17 01:18, Eric Blake wrote: >> On 08/18/2017 08:31 AM, Stefan Hajnoczi wrote: >>> Most qcow2 files are uncompressed so it is wasteful to allocate (32 + 1) >>> * cluster_size + 512 bytes upfront. Allocate s->cluster_cache and >>> s->cluster_

Re: [Qemu-devel] [PATCH] qcow2: allocate cluster_cache/cluster_data on demand

2017-08-18 Thread Alexey Kardashevskiy
On 19/08/17 01:18, Eric Blake wrote: > On 08/18/2017 08:31 AM, Stefan Hajnoczi wrote: >> Most qcow2 files are uncompressed so it is wasteful to allocate (32 + 1) >> * cluster_size + 512 bytes upfront. Allocate s->cluster_cache and >> s->cluster_data when the first read operation is performance on

Re: [Qemu-devel] [PATCH] qcow2: allocate cluster_cache/cluster_data on demand

2017-08-18 Thread Alexey Kardashevskiy
On 18/08/17 23:31, Stefan Hajnoczi wrote: > Most qcow2 files are uncompressed so it is wasteful to allocate (32 + 1) > * cluster_size + 512 bytes upfront. Allocate s->cluster_cache and > s->cluster_data when the first read operation is performance on a > compressed cluster. > > The buffers are fr

Re: [Qemu-devel] [PATCH] qcow2: allocate cluster_cache/cluster_data on demand

2017-08-18 Thread Eric Blake
On 08/18/2017 08:31 AM, Stefan Hajnoczi wrote: > Most qcow2 files are uncompressed so it is wasteful to allocate (32 + 1) > * cluster_size + 512 bytes upfront. Allocate s->cluster_cache and > s->cluster_data when the first read operation is performance on a > compressed cluster. > > The buffers a

[Qemu-devel] [PATCH] qcow2: allocate cluster_cache/cluster_data on demand

2017-08-18 Thread Stefan Hajnoczi
Most qcow2 files are uncompressed so it is wasteful to allocate (32 + 1) * cluster_size + 512 bytes upfront. Allocate s->cluster_cache and s->cluster_data when the first read operation is performance on a compressed cluster. The buffers are freed in .bdrv_close(). .bdrv_open() no longer has any