From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37219) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKiB6-0000pY-B6 for qemu-devel@nongnu.org; Wed, 06 Jul 2016 04:27:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bKiB4-0006Gu-9Y for qemu-devel@nongnu.org; Wed, 06 Jul 2016 04:27:27 -0400 Date: Wed, 6 Jul 2016 10:27:18 +0200 From: Kevin Wolf Message-ID: <20160706082718.GE5233@noname.str.redhat.com> References: <1467733852-27097-1-git-send-email-kwolf@redhat.com> <1467733852-27097-19-git-send-email-kwolf@redhat.com> <577C6970.4070907@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="U+BazGySraz5kW0T" Content-Disposition: inline In-Reply-To: <577C6970.4070907@redhat.com> Subject: Re: [Qemu-devel] [PULL 18/43] block: Switch discard length bounds to byte-based List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org --U+BazGySraz5kW0T Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Am 06.07.2016 um 04:14 hat Eric Blake geschrieben: > On 07/05/2016 09:50 AM, Kevin Wolf wrote: > > From: Eric Blake > >=20 > > Sector-based limits are awkward to think about; in our on-going > > quest to move to byte-based interfaces, convert max_discard and > > discard_alignment. Rename them, using 'pdiscard' as an aid to > > track which remaining discard interfaces need conversion, and so > > that the compiler will help us catch the change in semantics > > across any rebased code. The BlockLimits type is now completely > > byte-based; and in iscsi.c, sector_limits_lun2qemu() is no > > longer needed. > >=20 >=20 > > +++ b/include/block/block_int.h > > @@ -324,11 +324,17 @@ struct BlockDriver { > > }; > > =20 > > typedef struct BlockLimits { > > - /* maximum number of sectors that can be discarded at once */ > > - int max_discard; > > - > > - /* optimal alignment for discard requests in sectors */ > > - int64_t discard_alignment; > > + /* maximum number of bytes that can be discarded at once (since it > > + * is signed, it must be < 2G, if set), should be multiple of > > + * pdiscard_alignment, but need not be power of 2. May be 0 if no > > + * inherent 32-bit limit */ > > + int32_t max_pdiscard; > > + > > + /* optimal alignment for discard requests in bytes, must be power > > + * of 2, less than max_pdiscard if that is set, and multiple of > > + * bs->request_alignment. May be 0 if bs->request_alignment is > > + * good enough */ > > + uint32_t pdiscard_alignment; >=20 > Given the recent thread on an iscsi device with 15M optimum alignment > for zero and discards, I guess I have some followup patches to write if > we don't want to stall this pull request. Please send a followup patch (series). Does this one actually change the behaviour or just document the behaviour that we already expected? Kevin --U+BazGySraz5kW0T Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJXfMDmAAoJEH8JsnLIjy/W1wEQAKyFUDHX13Mjtbz9yesvmOCx Vn7+MC3DRutRkBxzmlLO+iliUmHVZihR+3O33zjjfFyLL6RPdJ56Wh/dq3p089zf pqFGRs9sbDO3Xmc84nV0H7Fgnr9iZmpXElpduTz5kZ0EOGDcimWUKGYDMZROYmW8 H+vIrVYQj234WhBwgyVE3CTjIku5zY4F+D2sLROHUiFsptkxbxkyqKryLwWzPseh 4mIE/VlcOfKSnhiXI+FTyioVlSjO3EzVQ5+XL22u5igKVik/jY0pb3L1U9BzIlcx N+zUkOhBdwCNxKHqN0wj0ADlnu3xEdOViu+Ak5t6f0ndtldGH6uUBLAXKsJSHdnu 3pzp7MFAZ2rQ+IoBC2fqv43w22tLHvMfSgyyi4pW9JukMWQAKD2UOnHDdfgurEwD xK6tjcA91N9DGDcK2KQaLS5nNLHJ+/3mByXRxYCzkODC7gIAYgreFCXQgOPA17ah yGT4Wzp7hEak4ItVabQOj/fXcFw2qTThxohfyjr+qgAVxkD9drWqc/GbziiEyLxz MIAjk85brxe5V2MaK3ZjSJpOUwX426410U2E1Q94KNV+zv/i/0YFy1hzir7556az Rc6xfnnco3xuearukjKxYPzsTTAxtJiBiZnpYWbYfKZ2I7JpG0ePpnrDm1wWahgq GFr3U52Osl0pOvt6Jo5W =Lmsk -----END PGP SIGNATURE----- --U+BazGySraz5kW0T--