Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Dec 1997 13:25:43 -0800
From:      Julian Elischer <julian@whistle.com>
To:        Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de>
Cc:        scsi@freebsd.org
Subject:   Re: Questions about mt and SCSI subsystem
Message-ID:  <348F08D6.63DABEB6@whistle.com>
References:  <199712100037.SAA25972@nospam.hiwaay.net> <199712100243.TAA18226@narnia.plutotech.com> <19971210093732.48185@uriah.heep.sax.de>

next in thread | previous in thread | raw e-mail | index | archive | help
I'd offer to fix it if I could be told what he right thing to do is..
but I don't have a tape drive here at all..

J Wunsch wrote:
> As Justin T. Gibbs wrote:> 
> >   The FreeBSD st driver (including the CAM one),
> > return EIO when a filemark is encountered or  a "blank check" is reported.
> > It's up to the reading program to decide what that means.
> 
> This is wrong.  It breaks the normal conventions for read(2) that say
> encountering EOF upon a read request should terminate the request with
> an appropriate return value (possibly 0 bytes read), but with no error
> condition.  As such, it breaks the EOF detection in dump(8).
> 
> Of course, returning EIO afterwards is appropriate.
> 
> > Assuming the device supports the READ POSITION scsi command, there's no
> > reason we can't add this feature to mt/sa(4).
> 
> Unfortunately, READ POSITION only reports block numbers, but not tape
> file numbers.  A block number is rather useless for most people, while
> many are interested in the current tape file number.  We have to count
> the filemarks manually in the driver, i'm afraid.
> 
> (I've been playing with READ POSITION a little.)
> 
> --
> cheers, J"org
> 
> joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
> Never trust an operating system you don't have sources for. ;-)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?348F08D6.63DABEB6>