-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256


On 22/05/2015 22:20, Eric Blake wrote:
> But I'm worried about a shallow copy.  If I start with "base <-
> active", where "active" has an explicit zero cluster that is
> overwriting an allocated non-zero cluster in "base", and I'm
> creating the shallow clone to "base <- copy", then the default of
> 'unmap=true' says that bdrv_aio_write_zeroes() may attempt to unmap
> the cluster in "copy".  At which point, doesn't that mean that
> reading from "copy" will dredge up the non-zero data from "base",
> which is NOT a faithful mirroring of "active"?

No, bdv_aio_write_zeroes+BDRV_REQ_MAY_UNMAP only unmaps if it results
in zeroes.  In addition, unlike bdrv_aio_discard,
bdrv_aio_write_zeroes will do a real write of zeroes if [sector_num,
sector_num+nb_sectors) is not aligned to the disk's unmap granularity.

Paolo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJVYzPhAAoJEL/70l94x66DGMYIAKKGQIts+Ve689Iar0P6TmXz
BOO0xKJm477PAP9pvUtnGnpt+g2+OqKp0VBTu4F3tbLIQLQOZT1kAZ9oxJ9PMnEa
69c8n86DWdJIgx1lcnOI2wgjaoG65e2K2MH3vYs2Rj6ZD65/FfsF7+oj/R9zCgZm
MIMSiW/fbC5EjBQxOTkDWekuB+/iNRtV9K8YBCtmb8ZlF28X3FPrdZnoqcZGtxPL
RoGYLckjEuLMLSsDH3Frb1+lfKpCaSlJ203ihQQfXzr/8UBH4zOqPZOTbrhdA1pZ
3fHaW5KWyZ1vjW6bb64kpjMnRwCRxB+uAAY4pUmUCZxGsHxh19hGUeSuOexFvqc=
=GUVR
-----END PGP SIGNATURE-----

Reply via email to