Re: [Qemu-devel] [PATCH v3 05/22] qcow2: Refcount overflow and qcow2_alloc_bytes()

2014-11-27 Thread Stefan Hajnoczi
On Thu, Nov 20, 2014 at 06:06:21PM +0100, Max Reitz wrote: > qcow2_alloc_bytes() may reuse a cluster multiple times, in which case > the refcount is increased accordingly. However, if this would lead to an > overflow the function should instead just not reuse this cluster and > allocate a new one.

[Qemu-devel] [PATCH v3 05/22] qcow2: Refcount overflow and qcow2_alloc_bytes()

2014-11-20 Thread Max Reitz
qcow2_alloc_bytes() may reuse a cluster multiple times, in which case the refcount is increased accordingly. However, if this would lead to an overflow the function should instead just not reuse this cluster and allocate a new one. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block/qcow