From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34822) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0XGX-000405-46 for qemu-devel@nongnu.org; Fri, 27 Jun 2014 10:36:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X0XGN-0006x5-U9 for qemu-devel@nongnu.org; Fri, 27 Jun 2014 10:36:36 -0400 Received: from e06smtp14.uk.ibm.com ([195.75.94.110]:37275) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0XGN-0006wz-Ka for qemu-devel@nongnu.org; Fri, 27 Jun 2014 10:36:27 -0400 Received: from /spool/local by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 27 Jun 2014 15:36:25 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 367D31B08069 for ; Fri, 27 Jun 2014 15:36:56 +0100 (BST) Received: from d06av05.portsmouth.uk.ibm.com (d06av05.portsmouth.uk.ibm.com [9.149.37.229]) by b06cxnps3074.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s5REaNoP36110442 for ; Fri, 27 Jun 2014 14:36:23 GMT Received: from d06av05.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s5REaM0j002804 for ; Fri, 27 Jun 2014 08:36:23 -0600 Message-ID: <53AD8164.8080305@linux.vnet.ibm.com> Date: Fri, 27 Jun 2014 18:36:20 +0400 From: "Eugene \"jno\" Dvurechenski" MIME-Version: 1.0 References: <1403868326-7718-1-git-send-email-cornelia.huck@de.ibm.com> <1403868326-7718-4-git-send-email-cornelia.huck@de.ibm.com> <53AD5947.2040704@suse.de> <53AD5B9D.7030400@de.ibm.com> <53AD6BE4.9000200@linux.vnet.ibm.com> <53AD6D80.7000607@de.ibm.com> In-Reply-To: <53AD6D80.7000607@de.ibm.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hOWhvhXPmiphc0A2FLFCXGf8XrK7oMrbV" Subject: Re: [Qemu-devel] [PULL 03/10] pc-bios/s390-ccw: handle different sector sizes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christian Borntraeger , Alexander Graf , Cornelia Huck , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, jfrei@linux.vnet.ibm.com, aliguori@amazon.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --hOWhvhXPmiphc0A2FLFCXGf8XrK7oMrbV Content-Type: multipart/mixed; boundary="------------010909020909050109070100" This is a multi-part message in MIME format. --------------010909020909050109070100 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Yes, this patch doesn't make the code worse. On 06/27/2014 05:11 PM, Christian Borntraeger wrote: > On 27/06/14 15:04, Eugene "jno" Dvurechenski wrote: >> >> >> On 06/27/2014 03:55 PM, Christian Borntraeger wrote: >>>>> - const int max_entries =3D (SECTOR_SIZE / sizeof(ScsiBlockPtr))= ; >>>>> + const int max_entries =3D (MAX_SECTOR_SIZE / sizeof(ScsiBlockP= tr)); >>>> >>>> Is this really safe to increase? Doesn't max_entries depend on the r= eal sector size? >>> >>> I think this is now covered by this if statement: >>> if (bprs[i].blockct =3D=3D 0 && unused_space(&bprs[i + 1]= , >>> sizeof(ScsiBlockPtr))) { >>> >>> which was introduced by commit c77cd87cf54f003748f29c14ea1ddaecfc5c65= 3f (pc-bios/s390-ccw: fix for fragmented SCSI bootmap). >>> >>> So strictly speaking this if statement might not be needed any more: >>> if (i =3D=3D (max_entries - 1)) { >>> >>> Eugene, can you confirm? If yes we could add this patch later on as = a cleanup: >> >> I'd preserve both checks. >> In theory, we may catch a table that consumes all scratch space and >> leave no unused entry. >> >> Plus, this check for zero counter and last entry is for "continuation"= >> pointer, not for end-of-table by itself. >> >> I think now, this code may need even few more checks to cover more cas= es... >> > Ok. That means, that this patch as is, doesnt make anything worse. Corr= ect? >=20 > I am expecting more fixes and cleanups for the bios code anyway, so as = long as we dont add a regression here this should be good to go as it mak= es the whole code more flexible. >=20 > Christian >=20 --=20 Best Regards, Eugene "jno" Dvurechenski zLinux (KVM) Development - Software Engineer IBM Russia - Science & Technology Center phone: +7 (495) 660 8940 ext. 1021 --------------010909020909050109070100 Content-Type: text/x-vcard; charset=utf-8; name="jno.vcf" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="jno.vcf" YmVnaW46dmNhcmQNCmZuOkV1Z2VuZSBEdnVyZWNoZW5za2kNCm46RHZ1cmVjaGVuc2tpO0V1 Z2VuZQ0Kb3JnOklCTSBTeXN0ZW1zICYgVGVjaG5vbG9neSBHcm91cDtJQk0gUyZUIENlbnRl ciwgUnVzc2lhDQphZHI6OztPYnJ1Y2hldmEgc3QuLCBibGQuMzAvMSwgRTJWLCBmbG9vciA0 O01vc2Nvdzs7MTE3NDg1O1J1c3NpYQ0KZW1haWw7aW50ZXJuZXQ6am5vQGxpbnV4LnZuZXQu aWJtLmNvbQ0KdGl0bGU6U29mdHdhcmUgRW5naW5lZXINCnRlbDt3b3JrOis3ICg0OTUpIDY2 MCA4OTQwIGV4dC4gMTAyMQ0KdGVsO2NlbGw6KzcgKDkwMykgNzkwLTA3LTQ5DQp4LW1vemls bGEtaHRtbDpGQUxTRQ0KdXJsOmh0dHA6Ly9mc3cuc3UvDQp2ZXJzaW9uOjIuMQ0KZW5kOnZj YXJkDQoNCg== --------------010909020909050109070100-- --hOWhvhXPmiphc0A2FLFCXGf8XrK7oMrbV 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.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJTrYFkAAoJEBd44R522cduqpMP+QFrIKCiCsSShn6jT0xypwFr Do2+rn5+FngKC8WuoFYgcwPz8oNO8PMOwaGdvHyzTHXptUV/U/WQo9gGHrjhlLii NV5Sn9H1AnMtb/+zxZTyR+AfftKtRo/Zv1HZF5QK0KJhK/gdRxV2knErzEcC9pJu mY4zmuCJJBdLVbOaoCN8NMGyzMhmY6ExEb4xKKTky/p8yGpH6+fo/lE66pHwiT6R cfZ/u/Pm7R1fnuJtmvM71QtI9Oy3jt/PWlTapkLqKFfqpjcecJZ3neaadHBWG9PK f8zUQwAM8iaXZGHGif13dJyFPYzlQqBhPvTPoNUePdrwiywhWvsznTAuc4SauhOG UML2WHLmMRoPIPTbVOqCVYtjp3LeBqf/FsiwF46BiGygmh31TPuTxLU/cm00ojPY Xp+gIr0jYWMNvhFqOWROtgsYIn6nxhqpJdJd2TypomAOlgIZybHT1iUuItHz6Cz1 y3zhcqPGVXdiiT/fOucPiMm2SNADgUXGIjjojzgNLUidX2F4pdk4mNdFo90iF3VA rhbaJIXczXB9Lq4cjyMWztQAF4yl8B1kWHW6KSYSgLzFmlD3PqnXYLNNpdqouBIe CYqbZFOzMqn7fBrEVS2CQQHqXcqI5tPL5o7UlS5SEaF8wecP3HtZQdEQ8Hz7yfP/ uvFdhtHsBEZlCqtx8cVt =dbxM -----END PGP SIGNATURE----- --hOWhvhXPmiphc0A2FLFCXGf8XrK7oMrbV--