mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@SteelEye.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Andrew Morton <akpm@osdl.org>, Jens Axboe <axboe@suse.de>,
	Kernel development list <linux-kernel@vger.kernel.org>,
	SCSI development list <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH 2/3] SCSI core and sd: early detection of medium not present
Date: Fri, 09 Jun 2006 09:28:10 -0500	[thread overview]
Message-ID: <1149863290.3480.10.camel@mulgrave.il.steeleye.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0606091007370.16847-100000@netrider.rowland.org>

On Fri, 2006-06-09 at 10:13 -0400, Alan Stern wrote:
> I did it that way in the patch because it was the only simple choice.  The 
> scsi_test_unit_ready() routine is part of the SCSI core and can be called 
> for devices that aren't disks.  Hence any flag it sets cannot be part of 
> the scsi_disk structure.

The slightly more complex choice that would be to extend
scsi_test_unit_ready() to allow the sending of a sense header pointer.
Then any user could use the sense return data for setting local
flags ... and thus, they could be kept local.

> In principle the information could be conveyed in the return value from 
> scsi_test_unit_ready() rather than in a static flag.  But the routine has 
> several callers and I didn't want to change all of them to recognize a 
> -ENOMEDIUM return code.  Now in the long run, perhaps that would be a good 
> thing to do.  Or perhaps moving the flag to scsi_device would be better, I 
> don't know...
> 
> Ultimately this boils down to how you want to represent "No medium 
> present" in the SCSI core.  What do you think is the bets way?

Well ... that's where I think we follow the CD people, since they're the
ones who have this occurring the most often.

James



  reply	other threads:[~2006-06-09 14:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-06 15:31 Alan Stern
2006-06-09  0:57 ` James Bottomley
2006-06-09 14:13   ` Alan Stern
2006-06-09 14:28     ` James Bottomley [this message]
2006-06-09 14:54       ` 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=1149863290.3480.10.camel@mulgrave.il.steeleye.com \
    --to=james.bottomley@steeleye.com \
    --cc=akpm@osdl.org \
    --cc=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®