linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robert Hancock <hancockr@shaw.ca>
To: Kai Makisara <Kai.Makisara@kolumbus.fi>
Cc: Carlo Nyto <carlonyto@gmail.com>, linux-kernel@vger.kernel.org
Subject: Re: Slow tape drive timeout
Date: Wed, 02 Apr 2008 22:21:13 -0600	[thread overview]
Message-ID: <47F45B39.7080305@shaw.ca> (raw)
In-Reply-To: <fa.of3hIrxfNefAS08Tzqfm1dI0BOo@ifi.uio.no>

Kai Makisara wrote:
> On Tue, 1 Apr 2008, Carlo Nyto wrote:
> 
>> I am experiencing a two minute timeout open()ing a tape device when
>> there is no tape in the drive.
>>
>> open() with O_NONBLOCK succeeds immediately, however.
>>
> This is how open() is supposed to work according to standards (e.g., SUS) 
> if O_NONBLOCK is supported. (Well, actually open() should wait 
> indefinitely but the non-linux systems I tested had a timeout.) The linux 
> st driver was changed to comply with standards at 2.5.3. I.e., the 2.4 
> kernels did return immediately but the 2.6 kernels have always waited.
> 
>> The problem is that I am trying to set up Legato on a system that has
>> multiple tape drives. For certain common operations, Legato tries to
>> open() each tape drive multiple times. On a system with multiple tape
>> drives, this adds up to a significant amount of time wasted due to
>> this timeout.
>>
> You are not the only person who has noticed this. At work we had to 
> install a distribution using 2.4 kernel to our backup server in order to 
> use Legato ;-(
> 
> But this is a Legato problem, not a kernel problem.
> 
>> Solaris does not have this problem, and Legato support advises that
>> they are at the mercy of the operating system.
>>
> Solaris does return EIO. Either it does not support O_NONBLOCK or it is 
> not compliant with SUS.
> 
> Legato would not be so much "at the mercy of the operating system" if they 
> would write their software to work according to standards, not according 
> to some operating system.

Why is accessing the tape drive with no tape in it causing a timeout in 
the first place? I should think that would fail immediately with some 
"medium not present" error from the drive. Unless the drive has no 
mechanism to detect it, but that seems really retarded..

       reply	other threads:[~2008-04-03  4:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <fa.iY7vJs54MoScDgyQ4PUWZsO+3Jw@ifi.uio.no>
     [not found] ` <fa.of3hIrxfNefAS08Tzqfm1dI0BOo@ifi.uio.no>
2008-04-03  4:21   ` Robert Hancock [this message]
2008-04-03 18:34     ` Slow tape drive timeout Kai Makisara
2008-04-04  2:25       ` Robert Hancock
2008-04-04 18:04         ` Kai Makisara
     [not found] <aepft-NF-5@gated-at.bofh.it>
     [not found] ` <aepft-NF-7@gated-at.bofh.it>
     [not found]   ` <aepfs-NF-3@gated-at.bofh.it>
     [not found]     ` <aeCw6-5Yu-35@gated-at.bofh.it>
2008-04-04  9:37       ` Bodo Eggert
2008-04-01 20:30 Carlo Nyto
2008-04-02  5:09 ` Kai Makisara

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=47F45B39.7080305@shaw.ca \
    --to=hancockr@shaw.ca \
    --cc=Kai.Makisara@kolumbus.fi \
    --cc=carlonyto@gmail.com \
    --cc=linux-kernel@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;
as well as URLs for NNTP newsgroup(s).