public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@SteelEye.com>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] tmscsim: implement change_queue_depth
Date: Sun, 26 Dec 2004 09:49:26 -0600	[thread overview]
Message-ID: <1104076166.5268.22.camel@mulgrave> (raw)
In-Reply-To: <Pine.LNX.4.60.0412240126400.27610@poirot.grange>

On Sat, 2004-12-25 at 01:36 +0100, Guennadi Liakhovetski wrote:
> Well, I didn't look in the block layer command queue handling, I just saw 
> this in scsi_adjust_queue_depth
> 
> 	/* Check to see if the queue is managed by the block layer
> 	 * if it is, and we fail to adjust the depth, exit */
> 	if (blk_queue_tagged(sdev->request_queue) &&
> 	    blk_queue_resize_tags(sdev->request_queue, tags) != 0)
> 		goto out;
> 
> and thought that this failure case has to be reported back... Like, if 
> somebody was trying to set queue depth for a device that doesn't support 
> it. Or would this be impossible for another reason?

No, it's not impossible.  However trying to second guess what went wrong
in an API when it doesn't return an error condition to you is a bad
thing.  You can return errors from things you know about or from things
you're told about, but you shouldn't do it by using heuristics to guess
that there was an error in certain cases (well unless the heuristics are
a documented part of the API).

James



  reply	other threads:[~2004-12-26 15:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-22 12:15 [PATCH] tmscsim: implement change_queue_depth Guennadi Liakhovetski
2004-12-23 18:34 ` James Bottomley
2004-12-25  0:36   ` Guennadi Liakhovetski
2004-12-26 15:49     ` James Bottomley [this message]
2004-12-26 21:49       ` Guennadi Liakhovetski
2004-12-27 18:31         ` James Bottomley
2004-12-28  0:29           ` Guennadi Liakhovetski

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=1104076166.5268.22.camel@mulgrave \
    --to=james.bottomley@steeleye.com \
    --cc=g.liakhovetski@gmx.de \
    --cc=linux-scsi@vger.kernel.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