Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Dec 1997 16:52:21 -0700
From:      "Justin T. Gibbs" <gibbs@plutotech.com>
To:        dan@math.berkeley.edu (Dan Strick)
Cc:        scsi@freebsd.org
Subject:   Re: Questions about mt and SCSI subsystem 
Message-ID:  <199712112354.QAA07142@pluto.plutotech.com>
In-Reply-To: Your message of "Thu, 11 Dec 1997 08:08:16 PST." <199712111608.IAA19183@math.berkeley.edu> 

next in thread | previous in thread | raw e-mail | index | archive | help
>> You favor this even if the media is specified to have a different EOD
>> convention... perhaps even one that the drive writes on your behalf?
>
>Yes.  Programs that read tapes should know as little as possible about
>specific kinds of tape drives.  In particular, they should not have to
>know SCSI error codes.  Note that not all SCSI tape drives support any
>sort of end-of-recording recognition.  Some just return a data error.

So, the application must assume that two 0 length reads in a row means
EOD even if the drive/media is perfectly capable of telling you this
in a different manner?  Of course, the program reading the tape can't
assume that two 0 length reads in a row is EOD since it could very well
be that a zero length file was written.  If we don't want the program
to have to do this, it seems as if the driver should interpret EOD as
two filemarks in a row for the media types with this convention and only
write two filemarks on these media types as well.

>> > The convention that a raw tape driver return a single zero length
>
>I should have been more explicit.  A tape driver should return a
>single zero-length-read to indicate EOF.  The next read should return 
>the first record of the next file on the tape (or nothing for another
>EOF).

This is the FreeBSD behavior.

>Dan Strick
>dan@math.berkeley.edu

--
Justin





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199712112354.QAA07142>