From: Mike Christie <michaelc@cs.wisc.edu>
To: dougg@torque.net
Cc: James Bottomley <James.Bottomley@SteelEye.com>,
Joerg Schilling <Joerg.Schilling@fokus.fraunhofer.de>,
stern@rowland.harvard.edu, schilling@fokus.fraunhofer.de,
linux-scsi@vger.kernel.org, dgilbert@interlog.com
Subject: Re: [Bug 7026] CD/DVD burning with USB writer doesn't work
Date: Wed, 06 Dec 2006 16:50:15 -0600 [thread overview]
Message-ID: <45774927.8090204@cs.wisc.edu> (raw)
In-Reply-To: <4577374B.9000204@cs.wisc.edu>
Mike Christie wrote:
> Douglas Gilbert wrote:
>> James Bottomley wrote:
>>> On Wed, 2006-12-06 at 00:14 +0100, Joerg Schilling wrote:
>>>> Well, accept the patch if it works.
>>> It's not about work/not work: it's about correctness.
>>>
>>>> And in case that you don't like it, make sure that the _parameter_ is
>>>> moved to where it belongs: to the low level transport layer.
>>> It's not a low level property; it's a property of the generic queue,
>>> namely the maximum request size. It exists for devices independent of
>>> SCSI (i.e. you'll want it for IDE and weirder transport attachment CDs
>>> as well).
>> Too much smoke and mirrors.
>>
>> That maximum request size comes from the transport ** and
>> in many cases is a kludge between maximum, optimal and
>> defensive. The block paradigm is wrong for a pass through
>> because it requests transports to guess a "maximum",
>> trying to head off errors that the block layer isn't
>> particularly well equipped to handle at run time.
>>
>> On the other hand a pass through gets layered error reporting.
>> So if a host (and/or its LLD driver) doesn't like the
>> size (or shape) of data to be sent/received with a
>
>
> For iscsi, we could negotiate a value like MaxBurstLength which says
> don't send commands with a payload larger than that size. I would guess
> other transports have something similar. We have to check or make sure
> we do not get commands larger than this somewhere. It is nice if some
> common layer could do this for us. Cards have a scatterlist limits and
> having them checked before they get to the driver for everyone is nice.
> I agree using and being limited to SG_ALL is a little strange since it
> is a odd size and having to recompile your kernel to get up to that
> limit is a pain in the butt, but that is not a problem with using the
> block layer. Those are scsi layer variables and I think those values can
> be changed.
>
> Is the main gripe over max sectors? I agree max sectors is odd because
> we do not know what that value means in some cases for pass through and
> what that real limit is for many drivers. Because the other values that
> we check in the block layer to create the scatterlist and request, seem
> worthwhile to check as early as possible and if we checked them at the
> driver level for every driver how would the test or return value be
> different? I think this is the part I do not fully understand when this
> keeps popping up.
>
Oh yeah the exception I am thinking about may not be max sectors exactly
but something close like iscsi's MaxBurstLength limit. Maybe iscsi LLDs
are supposed to be translating that iscsi limit to max_sectors in which
case we are talking about the same thing. For this limit we do not want
a FS or pass through request with more data than MaxBurstLength bytes.
If it is different than max_hw_sectors, we could add q->max_request_size
and check this in the block mapping and request building functions, but
the error value would be generic like maybe BLKERR_REQUEST_TOO_LARGE.
You would not be able to tell the user that specifically the request was
larger than the iscsi MaxBurstLength.
I am not sure how this fits into the argument, since there is no
guessing with it. The block layer handles this nicely for FS requests by
breaking up requests into the correct size. The limit also applies to
pass through requests and we can get a error indicating it is too large.
The draw back is of course lack of information to the user or upper
layer and it seems you guys are arguing where this type check belongs.
next prev parent reply other threads:[~2006-12-06 22:51 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-04 20:11 [Bug 7026] CD/DVD burning with USB writer doesn't work Alan Stern
2006-12-04 21:07 ` James Bottomley
2006-12-05 20:52 ` Alan Stern
2006-12-05 21:50 ` James Bottomley
2006-12-05 22:46 ` Joerg Schilling
2006-12-05 22:58 ` James Bottomley
2006-12-05 23:14 ` Joerg Schilling
2006-12-06 16:12 ` James Bottomley
2006-12-06 16:57 ` Douglas Gilbert
2006-12-06 21:34 ` Mike Christie
2006-12-06 21:46 ` Alan Stern
2006-12-07 10:34 ` Joerg Schilling
2006-12-07 18:27 ` Alan Stern
2006-12-08 12:45 ` Joerg Schilling
2006-12-08 15:46 ` Alan Stern
2006-12-06 22:50 ` Mike Christie [this message]
2006-12-06 23:42 ` Jeremy Linton
2006-12-06 23:55 ` Jeremy Linton
2006-12-07 1:22 ` Mike Christie
2006-12-07 1:40 ` Mike Christie
2006-12-07 2:05 ` Mike Christie
2006-12-06 17:42 ` Joerg Schilling
2006-12-06 16:32 ` Alan Stern
2006-12-06 16:47 ` James Bottomley
2006-12-06 17:21 ` Alan Stern
2006-12-06 17:25 ` James Bottomley
2006-12-06 18:58 ` Alan Stern
2006-12-06 19:13 ` James Bottomley
2006-12-06 20:31 ` Alan Stern
2007-01-08 16:19 ` Alan Stern
2007-01-08 16:25 ` James Bottomley
2007-01-24 20:36 ` Alan Stern
2007-01-08 19:24 ` Jens Axboe
2006-12-06 17:51 ` Joerg Schilling
2006-12-06 17:49 ` Joerg Schilling
2006-12-06 17:59 ` James Bottomley
2006-12-06 18:38 ` Douglas Gilbert
2006-12-06 18:50 ` James Bottomley
2006-12-06 20:04 ` Douglas Gilbert
2006-12-06 18:48 ` Joerg Schilling
2006-12-06 18:43 ` Douglas Gilbert
2006-12-05 21:55 ` Douglas Gilbert
2006-12-05 23:08 ` Joerg Schilling
2006-12-05 22:35 ` Joerg Schilling
2006-12-05 23:03 ` Joerg Schilling
-- strict thread matches above, loose matches on Subject: below --
2007-02-09 10:50 Joerg Schilling
2007-02-09 17:57 ` Alan Stern
2007-02-10 2:02 ` James Bottomley
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=45774927.8090204@cs.wisc.edu \
--to=michaelc@cs.wisc.edu \
--cc=James.Bottomley@SteelEye.com \
--cc=Joerg.Schilling@fokus.fraunhofer.de \
--cc=dgilbert@interlog.com \
--cc=dougg@torque.net \
--cc=linux-scsi@vger.kernel.org \
--cc=schilling@fokus.fraunhofer.de \
--cc=stern@rowland.harvard.edu \
/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.