On Thu, 04/26 16:34, Stefan Hajnoczi wrote:
> On Wed, Apr 18, 2018 at 11:04:20AM +0800, Fam Zheng wrote:
> > +static int qcow2_co_copy_range_to(BlockDriverState *bs,
> > + BdrvChild *src, uint64_t src_offset,
> > + BdrvChild *dst, uint64_t dst_offset,
> > + uint64_t bytes, BdrvRequestFlags flags)
> > +{
>
> In theory this could increment the refcount if src == dst. It's not
> necessary to go down to leaf nodes if the sharing can be handled at the
> qcow2 L2 table level.
Yes, this is a good optimization to have.
Fam