From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34348) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNfY7-0007mo-7E for qemu-devel@nongnu.org; Thu, 14 Jul 2016 08:15:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bNfY1-0007Tt-7S for qemu-devel@nongnu.org; Thu, 14 Jul 2016 08:15:26 -0400 Date: Thu, 14 Jul 2016 13:15:17 +0100 From: Stefan Hajnoczi Message-ID: <20160714121517.GD15476@stefanha-x1.localdomain> References: <1466610674-23157-1-git-send-email-eblake@redhat.com> <1466610674-23157-2-git-send-email-eblake@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="yudcn1FV7Hsu/q59" Content-Disposition: inline In-Reply-To: <1466610674-23157-2-git-send-email-eblake@redhat.com> Subject: Re: [Qemu-devel] [Qemu-block] [PATCH 01/17] block: Convert bdrv_co_discard() to byte-based List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: qemu-devel@nongnu.org, kwolf@redhat.com, Fam Zheng , Stefan Hajnoczi , qemu-block@nongnu.org, Max Reitz --yudcn1FV7Hsu/q59 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 22, 2016 at 09:50:58AM -0600, Eric Blake wrote: > Another step towards byte-based interfaces everywhere. Replace > the sector-based bdrv_co_discard() with a new byte-based > bdrv_co_pdiscard(), which silently ignores any unaligned head > or tail. Driver callbacks will be converted in followup patches. >=20 > By calculating the alignment outside of the loop, and clamping > the max discard to an aligned value, we can simplify the actions > done within the loop. >=20 > Signed-off-by: Eric Blake > --- > include/block/block.h | 2 +- > block/blkreplay.c | 3 ++- > block/block-backend.c | 3 ++- > block/io.c | 67 +++++++++++++++++++++++++++------------------= ------ > block/raw_bsd.c | 3 ++- > 5 files changed, 42 insertions(+), 36 deletions(-) Reviewed-by: Stefan Hajnoczi --yudcn1FV7Hsu/q59 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJXh4JVAAoJEJykq7OBq3PIRSIIAMJla5/qfFUmnCK98xnlgfvv qF2HDB22xeW5yKFKlj8SzSwrc7zRp4RW4uem5zbdXmY44bQ/o1sALO51yzYFcQFE dqzHBqdHNKChY1LMBNoABdz1aQGybJAB6JfJUXDlcOqGTHyLPUfDBP360OrbkU7o SnG2Si3NKIzvPIwN7LUXI8rfB6iUx4tf/RNj/o3cnIZprPX8G/gpHbGiP6JtKLME i/n5fCE9lbc/fEtXSNRQNw0ZxeDszmVoZrr2JxP3t1GOKk1rbpUyzrk4aClUXDvp 7d5Fyi04SzpY0gnFVBgDUIilssIbNH4NHhjNb/eOaXnbnk19zJCVJyFIdlSBftE= =255x -----END PGP SIGNATURE----- --yudcn1FV7Hsu/q59--