public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@steeleye.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Patrick Mansfield <patmans@us.ibm.com>,
	Christoph Hellwig <hch@infradead.org>,
	Matthew Dharm <mdharm-scsi@one-eyed-alien.net>,
	SCSI development list <linux-scsi@vger.kernel.org>,
	USB Storage List <usb-storage@one-eyed-alien.net>
Subject: Re: Sysfs attribute file for max_sectors
Date: 06 Jan 2004 12:23:59 -0600	[thread overview]
Message-ID: <1073413440.2221.47.camel@mulgrave> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0401061301230.1043-100000@ida.rowland.org>

On Tue, 2004-01-06 at 12:07, Alan Stern wrote:
> Some USB Mass Storage devices need max_sectors set as low as 64 KB per
> transfer.  Many devices don't have this restriction, though, and it would
> be nice to give users an easy way to change the value.  Especially if we
> play it safe by starting with the default value set low; that way more
> capable devices wouldn't have to be penalized.

This is treading on dangerous ground.  Setting max_sectors too high is a
sure fire way to hang a driver.  Its value isn't really "policy" which
belongs in user land, its an expression of a driver constraint.

> The simplest way to export max_sectors to user processes is as a sysfs 
> attribute.  We have code that will do this for USB devices, but perhaps it 
> would be better as a general feature available for all SCSI devices.
> 
> What's your feeling?  Should max_sectors be exported for all SCSI devices 
> or only for USB mass storage devices?

The value is useful to know for all drivers, so exporting it in sysfs
should be fine.  If you want to do an attribute override in usb-storage,
you can...but I'd be very careful not to let the user set it to an
obviously wrong value (like larger than the sg array or something).

James



  reply	other threads:[~2004-01-06 18:24 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20031207051634.GB21951@one-eyed-alien.net>
2003-12-08 16:15 ` Notify about errors during initialization Alan Stern
2004-01-05  2:10   ` Matthew Dharm
2004-01-05 22:04     ` Alan Stern
2004-01-05 22:13       ` Christoph Hellwig
2004-01-05 23:32         ` Mike Anderson
2004-01-06 16:17           ` Christoph Hellwig
2004-01-06 17:15             ` Patrick Mansfield
2004-01-06 17:18               ` Christoph Hellwig
2004-01-06 18:08                 ` Mike Anderson
2004-01-06 18:08                   ` Christoph Hellwig
2004-01-06 19:04                     ` Mike Anderson
2004-01-06 18:07               ` Sysfs attribute file for max_sectors Alan Stern
2004-01-06 18:23                 ` James Bottomley [this message]
2004-01-06 19:31                   ` Alan Stern
2004-01-06 19:47                     ` James Bottomley
2004-01-07 16:16                       ` PATCH: (as168) " Alan Stern
2004-01-06 21:11                     ` Patrick Mansfield
2004-01-06 21:14                       ` Jens Axboe
2004-01-06 22:00                       ` Alan Stern

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=1073413440.2221.47.camel@mulgrave \
    --to=james.bottomley@steeleye.com \
    --cc=hch@infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mdharm-scsi@one-eyed-alien.net \
    --cc=patmans@us.ibm.com \
    --cc=stern@rowland.harvard.edu \
    --cc=usb-storage@one-eyed-alien.net \
    /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