From mboxrd@z Thu Jan 1 00:00:00 1970 From: Doug Ledford Subject: Re: [PATCH 2.5.17] Making SCSI not copy the request structure Date: Wed, 22 May 2002 23:14:45 -0400 Sender: linux-scsi-owner@vger.kernel.org Message-ID: <20020522231445.A3014@redhat.com> References: <20020522185349.D2819@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: ; from alan@lxorguk.ukuu.org.uk on Thu, May 23, 2002 at 03:01:37AM +0100 List-Id: linux-scsi@vger.kernel.org To: Alan Cox Cc: Patrick Mansfield , James Bottomley , linux-scsi@vger.kernel.org On Thu, May 23, 2002 at 03:01:37AM +0100, Alan Cox wrote: > One thing I see consistently as a problem in the block layers in 2.4 is > that there is no way to say "thanks for the request you just threw at me > but Im busy right now" and to flag "busy/idle". > > The network layer has a clean way to say "Im busy dont feed me", > "Im no longer busy, feed me" and also "thanks but I've just discovered I > am in fact busy have this request back anbd feed it me later" No, that does in fact exist. At least in the new scsi eh code you are allowed to return a non-0 value from your low level driver's queuecommand() routine. On a non-0 return, the mid layer throws the command onto the mlqueue and waits to send it until the mid layer processes a completion event from you (or there might also be a timeout, I'm not sure, but I would hope there is also a timeout since otherwise returning non-0 with no outstanding commands on a device because your driver is busy with something else could cause a queue to hang). Anyway, it's there even if I never did personally use it since my driver used the old eh code ;-) -- Doug Ledford 919-754-3700 x44233 Red Hat, Inc. 1801 Varsity Dr. Raleigh, NC 27606