From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38994) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKXmB-0000IL-PM for qemu-devel@nongnu.org; Fri, 13 Sep 2013 14:07:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VKXm6-0002vl-Ua for qemu-devel@nongnu.org; Fri, 13 Sep 2013 14:07:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48427) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKXm6-0002tW-Mn for qemu-devel@nongnu.org; Fri, 13 Sep 2013 14:07:22 -0400 Message-ID: <52335450.9070802@redhat.com> Date: Fri, 13 Sep 2013 12:07:12 -0600 From: Eric Blake MIME-Version: 1.0 References: <1379067909-22984-1-git-send-email-pl@kamp.de> <1379067909-22984-4-git-send-email-pl@kamp.de> In-Reply-To: <1379067909-22984-4-git-send-email-pl@kamp.de> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="7N8kSSW38I6vCRFg00FLb4Hq8wDFire7S" Subject: Re: [Qemu-devel] [PATCH 03/12] block: introduce BDRV_REQ_MAY_UNMAP in bdrv_co_write_zeroes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven Cc: kwolf@redhat.com, ronniesahlberg@gmail.com, stefanha@redhat.com, qemu-devel@nongnu.org, anthony@codemonkey.ws, pbonzini@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --7N8kSSW38I6vCRFg00FLb4Hq8wDFire7S Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 09/13/2013 04:25 AM, Peter Lieven wrote: > the BDRV_REQ_MAY_UNMAP flag is used to indicate that block driver > is allowed to optimze a write zeroes request by unmapping (discarding) s/optimze/optimize/ > blocks if it is guaranteed that the result will read back as > zeroes. >=20 > the flag is only passed to the driver if the block device is > opened with BDRV_O_UNMAP. >=20 > Signed-off-by: Peter Lieven > --- > +++ b/include/block/block.h > @@ -65,6 +65,7 @@ typedef struct BlockDevOps { > typedef enum { > BDRV_REQ_COPY_ON_READ =3D 0x1, > BDRV_REQ_ZERO_WRITE =3D 0x2, > + BDRV_REQ_MAY_UNMAP =3D 0x4, Now that this enum is public, it would be useful to have inline documentation, rather than making people dig up the git history of when it was introduced to learn its semantics. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --7N8kSSW38I6vCRFg00FLb4Hq8wDFire7S Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJSM1RQAAoJEKeha0olJ0NqYJQH/0xmlOudftTtME0WjDJe6299 XpOh1jVasxbEv9ZHWc2BUEBvXnJZJf/PNjYMdk8D52r6BYtofY/4EIZGBEgfBEC0 iShPptsxprm23ACE6auSfkJ7PFXJ3cBV/lhObb1S+c6Zs5/v7GnlpbqRFXlyTSGq I732rC98Six3M1BWE6vnkmDhAnKmFlqKUDU5sjWWAmChj9+LRHyMZkLsic0mcZlV JRpHHCRcdjbX7q72ngwaLr/adx5vRJWK4IqDx9+abO4MNi+NWTn5+X2Db0xP0gYy hre8070BtPVyltL00P4F4jpJ0+HQoGsvHOAe8BIqYZaVP6G5AekZwHJRTfJ19w8= =jhwI -----END PGP SIGNATURE----- --7N8kSSW38I6vCRFg00FLb4Hq8wDFire7S--