From: Douglas Gilbert <dgilbert@interlog.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Joerg Schilling <schilling@fokus.fraunhofer.de>,
James Bottomley <James.Bottomley@SteelEye.com>,
SCSI development list <linux-scsi@vger.kernel.org>
Subject: Re: [Bug 7026] CD/DVD burning with USB writer doesn't work
Date: Tue, 05 Dec 2006 16:55:52 -0500 [thread overview]
Message-ID: <4575EAE8.7040303@interlog.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0612051546250.6667-100000@iolanthe.rowland.org>
Alan Stern wrote:
> I decided to do this by email instead of bugzilla so that it would be
> visible to everyone on the linux-scsi mailing list.
>
> Re: http://bugzilla.kernel.org/show_bug.cgi?id=7026
>
> To recap: Joerg Schilling needs to be able to retrieve the max_sectors
> value for a SCSI device's request queue. Doing it via sysfs is rather
> clumsy, especially when only a file descriptor is available and not the
> device name. He has asked for an ioctl interface to provide the
> information.
>
> Is the patch below acceptable?
Alan,
I just spent an hour thinking about how to data mine through
that dreadful mess that /sys has become as I try to add
transport information to lsscsi.
And then this post made my day. Fancy that, adding a new
ioctl!! I hope the ioctl police aren't watching :-)
Apart from sensibly yielding the max size in bytes, your patch
has the added benefit of allowing non-block devices (e.g. tape,
processor and enclosure services) to find out what limit the
OS/host has placed on each command's maximum transfer size.
If you manage to get that ioctl in, then ungrateful people
will ask for the corresponding "set" operation as well.
To illustrate the /sys mess look at naming of the sysfs approach
to this problem. For example:
/sys/block/sde/queue/max_sectors_kb
- it is not only a "block" property
- sde is an "end device" and suggests information from that
device's Block Limits VPD page, actually it is a limit
imposed by the OS and the host used to access that device
- what has "queue" got to do with it?
- "max_sectors_kb" should have units of bytes
And /sys has the horrible side effect of enshrining a badly
conceived design in a user interface (and SAS comes to mind).
Best of luck
Doug Gilbert
BTW Joerg: SG_SET_RESERVED_SIZE simply makes it extremely
unlikely that the sg driver will not be able to fetch
enough memory from the kernel to move data associated with
a SCSI command. The block layer SG_IO just fudges that.
While a major concern in lk 2.0, memory starvation is typically
not a major concern in lk 2.6 assuming modern hardware.
The sg driver's reserved buffer has other uses as
FUJITA Tomonori pointed out yesterday on the linux-scsi list.
next prev parent reply other threads:[~2006-12-05 21:56 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
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 [this message]
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=4575EAE8.7040303@interlog.com \
--to=dgilbert@interlog.com \
--cc=James.Bottomley@SteelEye.com \
--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.