From owner-freebsd-scsi Thu Dec 11 15:54:27 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id PAA25741 for freebsd-scsi-outgoing; Thu, 11 Dec 1997 15:54:27 -0800 (PST) (envelope-from owner-freebsd-scsi) Received: from pluto.plutotech.com (mail.plutotech.com [206.168.67.137]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id PAA25731 for ; Thu, 11 Dec 1997 15:54:22 -0800 (PST) (envelope-from gibbs@plutotech.com) Received: from narnia.plutotech.com (narnia.plutotech.com [206.168.67.130]) by pluto.plutotech.com (8.8.7/8.8.5) with ESMTP id QAA07142; Thu, 11 Dec 1997 16:54:10 -0700 (MST) Message-Id: <199712112354.QAA07142@pluto.plutotech.com> X-Mailer: exmh version 2.0zeta 7/24/97 To: dan@math.berkeley.edu (Dan Strick) cc: scsi@freebsd.org Subject: Re: Questions about mt and SCSI subsystem In-reply-to: Your message of "Thu, 11 Dec 1997 08:08:16 PST." <199712111608.IAA19183@math.berkeley.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 11 Dec 1997 16:52:21 -0700 From: "Justin T. Gibbs" Sender: owner-freebsd-scsi@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >> 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