public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Kai Makisara <Kai.Makisara@kolumbus.fi>
Cc: SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: st: Fixup -ENOMEDIUM
Date: Fri, 06 Oct 2006 11:19:17 +0200	[thread overview]
Message-ID: <45261F95.90301@suse.de> (raw)
In-Reply-To: <Pine.LNX.4.64.0610052216180.7808@kai.makisara.local>

Kai Makisara wrote:
> On Thu, 5 Oct 2006, Hannes Reinecke wrote:
> 
>> Hi all,
>>
>> currently the tape driver doesn't believe in ENOMEDIUM. Even if the sense code
>> from TUR indicates that no tape is present the command will be retried; maybe
>> the user is fast enough to slip a medium in in the meantime ...
>> And even if not, it will return 'EIO' in any case.
>>
> The driver implements (up to a point) the Single Unix Specification: if 
> O_NONBLOCK is clear, open() shall wait until the device is ready or 
> available. It does not wait indefinitely but implements a timeout. This is 
> the behaviour I found experimentally in some other Unices.
> 
Ah. Ok; you're the maintainer, you get to decide.

>> This patch fixes the ENOMEDIUM handling: TUR will _not_ be retried if no
>> medium is present and the correct error number ENOMEDIUM will be set on exit.
>>
> It is true that st_open() does not currently return ENOMEDIUM and your fix 
> for this is correct.
> 
>> Please apply.
>>
> I don't think that the first and second parts should be applied. The third 
> part fixes a bug and it should be applied. I include at the end a diff 
> containing only that part.
> 
Right. Thanks.

> -----------8<--------------------
> 
> Fix st_open() to return -ENOMEDIUM instead of -EIO if no medium is 
> found.
> 
> Signed-off-by: Kai Makisara <kai.makisara@kolumbus.fi>
> 
Signed-off-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke			hare@suse.de
SuSE Linux Products GmbH		S390 & zSeries
Maxfeldstraße 5				+49 911 74053 688
90409 Nürnberg				http://www.suse.de
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2006-10-06  9:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-05  9:26 st: Fixup -ENOMEDIUM Hannes Reinecke
2006-10-05 19:59 ` Kai Makisara
2006-10-06  9:19   ` Hannes Reinecke [this message]

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=45261F95.90301@suse.de \
    --to=hare@suse.de \
    --cc=Kai.Makisara@kolumbus.fi \
    --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