All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Eugene \"jno\" Dvurechenski" <jno@linux.vnet.ibm.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>,
	Alexander Graf <agraf@suse.de>,
	Cornelia Huck <cornelia.huck@de.ibm.com>,
	qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, jfrei@linux.vnet.ibm.com, aliguori@amazon.com
Subject: Re: [Qemu-devel] [PULL 03/10] pc-bios/s390-ccw: handle different sector sizes
Date: Fri, 27 Jun 2014 17:04:36 +0400	[thread overview]
Message-ID: <53AD6BE4.9000200@linux.vnet.ibm.com> (raw)
In-Reply-To: <53AD5B9D.7030400@de.ibm.com>


[-- Attachment #1.1: Type: text/plain, Size: 1296 bytes --]



On 06/27/2014 03:55 PM, Christian Borntraeger wrote:
>>> -    const int max_entries = (SECTOR_SIZE / sizeof(ScsiBlockPtr));
>>> +    const int max_entries = (MAX_SECTOR_SIZE / sizeof(ScsiBlockPtr));
>>
>> Is this really safe to increase? Doesn't max_entries depend on the real sector size?
> 
> I think this is now covered by this if statement:
>             if (bprs[i].blockct == 0 && unused_space(&bprs[i + 1],
>                 sizeof(ScsiBlockPtr))) {
> 
> which was introduced by commit c77cd87cf54f003748f29c14ea1ddaecfc5c653f (pc-bios/s390-ccw: fix for fragmented SCSI bootmap).
> 
> So strictly speaking this if statement might not be needed any more:
>         if (i == (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 cases...

-- 
Best Regards,
Eugene "jno" Dvurechenski
zLinux (KVM) Development - Software Engineer
IBM Russia - Science & Technology Center
phone: +7 (495) 660 8940 ext. 1021

[-- Attachment #1.2: jno.vcf --]
[-- Type: text/x-vcard, Size: 385 bytes --]

begin:vcard
fn:Eugene Dvurechenski
n:Dvurechenski;Eugene
org:IBM Systems & Technology Group;IBM S&T Center, Russia
adr:;;Obrucheva st., bld.30/1, E2V, floor 4;Moscow;;117485;Russia
email;internet:jno@linux.vnet.ibm.com
title:Software Engineer
tel;work:+7 (495) 660 8940 ext. 1021
tel;cell:+7 (903) 790-07-49
x-mozilla-html:FALSE
url:http://fsw.su/
version:2.1
end:vcard


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

  reply	other threads:[~2014-06-27 13:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-27 11:25 [Qemu-devel] [PULL 00/10] for-2.1: s390-ccw bios patches Cornelia Huck
2014-06-27 11:25 ` [Qemu-devel] [PULL 01/10] pc-bios/s390-ccw: make checkpatch happy Cornelia Huck
2014-06-27 11:25 ` [Qemu-devel] [PULL 02/10] pc-bios/s390-ccw: cleanup and enhance bootmap defintions Cornelia Huck
2014-06-27 11:25 ` [Qemu-devel] [PULL 03/10] pc-bios/s390-ccw: handle different sector sizes Cornelia Huck
2014-06-27 11:45   ` Alexander Graf
2014-06-27 11:55     ` Christian Borntraeger
2014-06-27 13:04       ` Eugene "jno" Dvurechenski [this message]
2014-06-27 13:11         ` Christian Borntraeger
2014-06-27 14:36           ` Eugene "jno" Dvurechenski
2014-06-27 12:59     ` Eugene "jno" Dvurechenski
2014-06-27 11:25 ` [Qemu-devel] [PULL 04/10] pc-bios/s390-ccw: add some utility code Cornelia Huck
2014-06-27 11:25 ` [Qemu-devel] [PULL 05/10] pc-bios/s390-ccw: Unify error handling Cornelia Huck
2014-06-27 11:25 ` [Qemu-devel] [PULL 06/10] pc-bios/s390-ccw: Add fill_hex_val func to provide better msgs Cornelia Huck
2014-06-27 11:25 ` [Qemu-devel] [PULL 07/10] pc-bios/s390-ccw: factor out ipl code Cornelia Huck
2014-06-27 11:25 ` [Qemu-devel] [PULL 08/10] pc-bios/s390-ccw: IPL from CDL-formatted ECKD DASD Cornelia Huck
2014-06-27 11:25 ` [Qemu-devel] [PULL 09/10] pc-bios/s390-ccw: IPL from LDL/CMS-formatted " Cornelia Huck
2014-06-27 11:25 ` [Qemu-devel] [PULL 10/10] pc-bios/s390-ccw: update binary Cornelia Huck
2014-06-29 10:58 ` [Qemu-devel] [PULL 00/10] for-2.1: s390-ccw bios patches Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53AD6BE4.9000200@linux.vnet.ibm.com \
    --to=jno@linux.vnet.ibm.com \
    --cc=agraf@suse.de \
    --cc=aliguori@amazon.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=jfrei@linux.vnet.ibm.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.