From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39615) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0Vpk-0003aS-RC for qemu-devel@nongnu.org; Fri, 27 Jun 2014 09:05:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X0Vpb-0007kc-9h for qemu-devel@nongnu.org; Fri, 27 Jun 2014 09:04:52 -0400 Received: from e06smtp16.uk.ibm.com ([195.75.94.112]:58752) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0Vpb-0007jF-1m for qemu-devel@nongnu.org; Fri, 27 Jun 2014 09:04:43 -0400 Received: from /spool/local by e06smtp16.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 27 Jun 2014 14:04:41 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 297FE17D8066 for ; Fri, 27 Jun 2014 14:06:07 +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 s5RD4cJQ31719666 for ; Fri, 27 Jun 2014 13:04:38 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 s5RD4bPH026470 for ; Fri, 27 Jun 2014 07:04:38 -0600 Message-ID: <53AD6BE4.9000200@linux.vnet.ibm.com> Date: Fri, 27 Jun 2014 17:04:36 +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> In-Reply-To: <53AD5B9D.7030400@de.ibm.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="73wOFEkG23MtOefxK8L1kT0E1jMSg6LsS" 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) --73wOFEkG23MtOefxK8L1kT0E1jMSg6LsS Content-Type: multipart/mixed; boundary="------------030700020508070209020001" This is a multi-part message in MIME format. --------------030700020508070209020001 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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(ScsiBlockPtr= )); >> >> Is this really safe to increase? Doesn't max_entries depend on the rea= l sector size? >=20 > I think this is now covered by this if statement: > if (bprs[i].blockct =3D=3D 0 && unused_space(&bprs[i + 1], > sizeof(ScsiBlockPtr))) { >=20 > which was introduced by commit c77cd87cf54f003748f29c14ea1ddaecfc5c653f= (pc-bios/s390-ccw: fix for fragmented SCSI bootmap). >=20 > So strictly speaking this if statement might not be needed any more: > if (i =3D=3D (max_entries - 1)) { >=20 > 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 cases.= =2E. --=20 Best Regards, Eugene "jno" Dvurechenski zLinux (KVM) Development - Software Engineer IBM Russia - Science & Technology Center phone: +7 (495) 660 8940 ext. 1021 --------------030700020508070209020001 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== --------------030700020508070209020001-- --73wOFEkG23MtOefxK8L1kT0E1jMSg6LsS 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/ iQIcBAEBAgAGBQJTrWvkAAoJEBd44R522cdu+e8P/idlVFyEu2mACfU8BRnXO5Cs eim+OVPvl6dBJtqRJIt7ipq3zHRhr8NgPIfiQF9eBH3IjgsUNBBzeojp6V4BWU3r oi79amt9dbczTVcNqG7cnYjQwQLhdJOZhjF+5JZljeJTCdCtlcEC9m3XrWi5yo/p pN/IPzgaz7Fuc1gfKitUh6NlcNiD0N67COzeuHdjgjys/xeSxpoTSVAQKmf0QTZl bGjktvQRELsK91cnug5/T6fcW7IMP+myJHsVBUxjrqDoqkwSBtd1mZORIFrw9GkU WL6T1w0vUl4tMyTWsj2auNpOMEynw3BCoIugq5RkKiaFnC3SiiSahDHnTvP5eaa5 zy4LenqV0qraK7699IZj2aeR0IYRwgr93ZByFgWDbjHSOEmzxk3GilG5o96hxwdZ dGB/42OfdXTDclwqRs4p5UKY7YTIBkAmBQEVpWjbVuVrmmsiZwvFaOx+VPSBwuch RcULuirDnCjiI8m+Gw5KMKmt7eoJWBVMCdnybmXFmfmw8Qd9Kx0IWtMQYpFL9Um5 DNjRy+DY2QZZZsls0uiCMUUZTdLCkTzStMCUovTfmJHa2qqzZer5Z92qIXN7FGZb /RNwr/ImZiIr/uBszrCUIJ5WvPpYilojXFEUowK2B/a+vsH+dhNPK9mXC1EcX9AD +myeY/2MttWdSvKtSi8R =pAbN -----END PGP SIGNATURE----- --73wOFEkG23MtOefxK8L1kT0E1jMSg6LsS--