Received: from eggs.gnu.org ([2001:4830:134:3::10]:40543) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c7Xo7-0000UH-RR for qemu-devel@nongnu.org; Thu, 17 Nov 2016 20:17:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c7Xo6-0007ek-O5 for qemu-devel@nongnu.org; Thu, 17 Nov 2016 20:17:35 -0500 References: <1479413642-22463-1-git-send-email-eblake@redhat.com> <1479413642-22463-8-git-send-email-eblake@redhat.com> From: Eric Blake Message-ID: Date: Thu, 17 Nov 2016 19:17:27 -0600 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="eW113KSKNEEHBPFs9gScGrTl6eXPG3twM" Subject: Re: [Qemu-devel] [PATCH v2 7/9] blkdebug: Add pass-through write_zero and discard support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, kwolf@redhat.com, pbonzini@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --eW113KSKNEEHBPFs9gScGrTl6eXPG3twM From: Eric Blake To: Max Reitz , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, kwolf@redhat.com, pbonzini@redhat.com Message-ID: Subject: Re: [PATCH v2 7/9] blkdebug: Add pass-through write_zero and discard support References: <1479413642-22463-1-git-send-email-eblake@redhat.com> <1479413642-22463-8-git-send-email-eblake@redhat.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/17/2016 05:27 PM, Max Reitz wrote: > On 17.11.2016 21:14, Eric Blake wrote: >> In order to test the effects of artificial geometry constraints >> on operations like write zero or discard, we first need blkdebug >> to manage these actions. Ideally, it would be nice to let these >> operations also react to injected errors like read/write/flush, >> but it is not trivial to turn bdrv_aio error injection (where >> we return BlockAIOCB*) into bdrv_co (where we return int), not >> to mention the fact that I don't want to conflict with Kevin's >> concurrent work on refactoring away from bdrv_aio. So for now, >> the operations merely have a TODO comment for adding error >> injection. >> >> However, one thing we CAN test is the contract promised by the >> block layer; namely, if a device has specified limits on >> alignment or maximum size, then those limits must be obeyed (for >> now, the blkdebug driver merely inherits limits from whatever it >> is wrapping, but the next patch will further enhance it to allow >> specific limit overrides). >> >> Tested by setting up an NBD server with export 'foo', then invoking: >> $ ./qemu-io >> qemu-io> open -o driver=3Dblkdebug blkdebug::nbd://localhost:10809/foo= >> qemu-io> d 0 15M >> qemu-io> w -z 0 15M >> >> Pre-patch, the server never sees the discard (it was silently >> eaten by the block layer); post-patch it is passed across the >> wire. Likewise, pre-patch the write is always passed with >> NBD_WRITE (with 15M of zeroes on the wire), while post-patch >> it can utilize NBD_WRITE_ZEROES (for less traffic). >> >> Signed-off-by: Eric Blake >> --- >> block/blkdebug.c | 61 +++++++++++++++++++++++++++++++++++++++++++++++= +++++++++ >> 1 file changed, 61 insertions(+) >=20 > I probably have to take my R-b back, since this patch breaks iotest 98.= Huh, I guess I tweaked things since the last time I reran full tests; but I indeed see a failure in './check -qcow2 98'. I'll investigate tomorrow when I'm not as tired. At least this patch is not 2.8 material, so respinning it doesn't affect the other patches that should go in before the release. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --eW113KSKNEEHBPFs9gScGrTl6eXPG3twM Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJYLlaoAAoJEKeha0olJ0NqCxoIAJ/B/IlA5yq4K0xmtL7NqHk3 qDLAc2GAYayln1sdwHFE2OXG+S6ilRaCVlw2kPykf8RA7SQM2WEY2bj7TntXARa1 K+mT5UmcW7C1CwzKiof46suFWHS1nn/32NnDZizVYI7KwFGicaoFNrUkbGQ8KftT Boq0UwFYrA/18TVJv6hO+rhAlESb49pda59qlhPH9xJcNJBiWdURz4jt7xYYn0lH 0nBSNHh6qNPCOU39XwdiO0iS9oB3KdzNT7ZcVyOW92ehE1CEnT7xMMkcqaw45dxm sVXrdgsjaTktRWDeTuDEGe9PpyM1WLB3htyd1nfEQYYosX06CxUZuSy/puhPzfc= =hZ9f -----END PGP SIGNATURE----- --eW113KSKNEEHBPFs9gScGrTl6eXPG3twM--