From owner-freebsd-scsi Wed Dec 10 13:30:38 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id NAA20849 for freebsd-scsi-outgoing; Wed, 10 Dec 1997 13:30:38 -0800 (PST) (envelope-from owner-freebsd-scsi) Received: from alpo.whistle.com (alpo.whistle.com [207.76.204.38]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id NAA20838 for ; Wed, 10 Dec 1997 13:30:34 -0800 (PST) (envelope-from julian@whistle.com) Received: (from daemon@localhost) by alpo.whistle.com (8.8.5/8.8.5) id NAA02639; Wed, 10 Dec 1997 13:28:13 -0800 (PST) Received: from UNKNOWN(), claiming to be "current1.whistle.com" via SMTP by alpo.whistle.com, id smtpd002637; Wed Dec 10 13:28:13 1997 Message-ID: <348F08D6.63DABEB6@whistle.com> Date: Wed, 10 Dec 1997 13:25:43 -0800 From: Julian Elischer Organization: Whistle Communications X-Mailer: Mozilla 3.0Gold (X11; I; FreeBSD 2.2-CURRENT i386) MIME-Version: 1.0 To: Joerg Wunsch CC: scsi@freebsd.org Subject: Re: Questions about mt and SCSI subsystem References: <199712100037.SAA25972@nospam.hiwaay.net> <199712100243.TAA18226@narnia.plutotech.com> <19971210093732.48185@uriah.heep.sax.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-scsi@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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. ;-)