From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>,
Aegis Lin <aegislin@gmail.com>,
Masakazu Mokuno <Masakazu_Mokuno@hq.scei.sony.co.jp>,
Cell Broadband Engine OSS Development <cbe-oss-dev@ozlabs.org>,
linux-scsi@vger.kernel.org, torvalds@linux-foundation.org,
akpm@linux-foundation.org, Jens Axboe <jens.axboe@oracle.com>,
Christoph Hellwig <hch@lst.de>
Subject: Re: [Cbe-oss-dev] [PATCH] ps3rom: sector size should be 512 bytes
Date: Thu, 31 Jan 2008 21:01:21 -0800 [thread overview]
Message-ID: <1201842081.11265.217.camel@haakon2.linux-iscsi.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0801312013460.957@vixen.sonytel.be>
On Thu, 2008-01-31 at 20:14 +0100, Geert Uytterhoeven wrote:
> On Thu, 31 Jan 2008, Nicholas A. Bellinger wrote:
> > On Thu, 2008-01-31 at 11:53 -0600, James Bottomley wrote:
> > > On Thu, 2008-01-31 at 09:28 -0800, Nicholas A. Bellinger wrote:
> > > > The problem case is a SCSI Target Mode engine that receives a 2048 Byte
> > > > single sector ATAPI READ_10 request from the storage fabric, and uses
> > > > scsi_execute_async() (the only option >= 2.6.18) to issue said request
> > > > to the underlying struct scsi_device. Because the underlying bio code
> > > > assumes 512 byte only sectors, the check in __bio_add_page() incorrectly
> > > > determines that max_sectors (max_sectors has to be low, as with 32 from
> > > > ps3rom.c) has been exceeded, and fails the request back up the stack.
> > >
> > > OK, so this is a totally separate issue from the one you actually posted
> > > it as a patch to fix?
> > >
> > > the queue max_sectors parameter is also counted in the block internal of
> > > 512 byte sectors. If you set it to 32 that means you were only
> > > expecting 16k of transfers per command maximum. If that's not right,
> > > then set the limit correctly.
> > >
> > > In short, and to repeat: almost every internal size counter to block is
> > > in units of 512 byte sectors ... that includes capacity, maximum etc ...
> > >
> >
> > Ok, after reading your followup with Geert I see that this looks like a
> > bug in ps3rom.c assuming 2048 byte sectors to calculate .max_sectors
> > (which was originally set to 32 as I mentioned). Using the setting
> > BOUNCE_SIZE << 9 where BOUNCE_SIZE is the request size in bytes looks
> > like this will solve the issue. My misunderstanding was
> > that .max_sectors was allowed to be calcuated in non 512 byte sectors,
> > so please disregard my patch.
> >
> > Geert, .max_sectors for ps3rom.c using 512 byte sectors ends up being
> > 128, yes.?
>
> Yes.
>
> With kind regards,
>
> Geert Uytterhoeven
> Software Architect
>
Great! I will update my ps3 to the latest 2.6.24 from ps3-linux.git and
get some new Linux/iSCSI.org Target builds made this weekend once
ps3rom-use-128-max-sector.patch is committed.
Also, I will be updating my userspace to FC8 PPC, and would like to get
a target build for the current stable 2.6.23 PPC64 from the addon CDs.
I also would not mind providing a ps3rom.ko with said patch for
interested parties using the default FC-8 Ps3-Linux kernel who are not
adventurous enough to build their own kernel until the Addon CDs are
reved again.
--nab
next prev parent reply other threads:[~2008-02-01 5:01 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <dc3abf350801290318u66474599n2f293832373f3706@mail.gmail.com>
2008-01-31 13:28 ` [Cbe-oss-dev] [PATCH] ps3rom: sector size should be 512 bytes Geert Uytterhoeven
2008-01-31 14:10 ` Nicholas A. Bellinger
2008-01-31 15:34 ` James Bottomley
2008-01-31 16:10 ` Nicholas A. Bellinger
2008-01-31 16:26 ` James Bottomley
2008-01-31 17:28 ` Nicholas A. Bellinger
2008-01-31 17:41 ` Geert Uytterhoeven
2008-01-31 18:06 ` James Bottomley
2008-01-31 18:48 ` Geert Uytterhoeven
2008-01-31 17:53 ` James Bottomley
2008-01-31 18:44 ` Nicholas A. Bellinger
2008-01-31 19:14 ` Geert Uytterhoeven
2008-02-01 5:01 ` Nicholas A. Bellinger [this message]
2008-01-31 19:42 ` James Bottomley
2008-02-01 1:58 ` Update SCSI documentation for 512 byte sector requirement with max_sectors Nicholas A. Bellinger
2008-02-01 2:46 ` Randy Dunlap
2008-02-01 4:38 ` Nicholas A. Bellinger
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=1201842081.11265.217.camel@haakon2.linux-iscsi.org \
--to=nab@linux-iscsi.org \
--cc=Geert.Uytterhoeven@sonycom.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=Masakazu_Mokuno@hq.scei.sony.co.jp \
--cc=aegislin@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=cbe-oss-dev@ozlabs.org \
--cc=hch@lst.de \
--cc=jens.axboe@oracle.com \
--cc=linux-scsi@vger.kernel.org \
--cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox