From owner-freebsd-scsi Thu Dec 11 13:12:52 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id NAA15639 for freebsd-scsi-outgoing; Thu, 11 Dec 1997 13:12:52 -0800 (PST) (envelope-from owner-freebsd-scsi) Received: from iafnl.es.iaf.nl (uucp@iafnl.es.iaf.nl [195.108.17.20]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id NAA15618 for ; Thu, 11 Dec 1997 13:12:46 -0800 (PST) (envelope-from wilko@yedi.iaf.nl) Received: by iafnl.es.iaf.nl with UUCP id AA23873 (5.67b/IDA-1.5 for scsi@FreeBSD.ORG); Thu, 11 Dec 1997 22:11:29 +0100 Received: (from wilko@localhost) by yedi.iaf.nl (8.8.5/8.6.12) id UAA08924; Thu, 11 Dec 1997 20:50:30 +0100 (MET) From: Wilko Bulte Message-Id: <199712111950.UAA08924@yedi.iaf.nl> Subject: Re: Questions about mt and SCSI subsystem To: joerg_wunsch@uriah.heep.sax.de Date: Thu, 11 Dec 1997 20:50:29 +0100 (MET) Cc: scsi@FreeBSD.ORG In-Reply-To: <19971211101003.17782@uriah.heep.sax.de> from "J Wunsch" at Dec 11, 97 10:10:03 am X-Organisation: Private FreeBSD site - Arnhem, The Netherlands X-Pgp-Info: PGP public key at 'finger wilko@freefall.freebsd.org' X-Mailer: ELM [version 2.4 PL24 ME8a] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-scsi@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk As J Wunsch wrote... > As Justin T. Gibbs wrote: > > > > The correct behaviour is that any read or write attempt, upon > > > encountering EOF (read) or EOM (write) should return a `short' > > > read/write (i.e., set b_resid accordingly), but shall not flag an > > > error condition. > > > > Are you sure about the behavior for write? > > Yep. dump and multivolume tar rely on this behaviour, that's why dump > -a is currently broken. (*) It gets an EIO at the end of the tape, > and assumes something went wrong with writing the last block, so > instead of asking for the next tape (which it would have done upon > write() returning 0), it asks to replace the same tape again, and > wants to write this one once more. Note that, while dump -a is my > invention, the algorithm to detect the end of tape has been there all > the time; dump -a only enforces the use of this algorithm over some > tape length calculations. > > (*) It was broken for (almost?) all disk and tape devices in FreeBSD. > People have been complaining about not being able to write multivolume > floppy tar archives, that finally made me fixing the floppy driver. > I'm not sure about sd(4) (and all the derived drivers), whether they > do it right or not. Keep in mind that the firmware of the drive has to do it *exactly* right to make this work. I remember (shudder) the problems we had with an Archive 525Mb QIC streamer years ago. So, even if the driver does it right, I'd still advise people to check if their device does it also right. (People do test their backups do they? ;-) Wilko _ ______________________________________________________________________ | / o / / _ Bulte email: wilko @ yedi.iaf.nl http://www.tcja.nl/~wilko |/|/ / / /( (_) Arnhem, The Netherlands - Do, or do not. There is no 'try' ---------------- Support your local daemons: run [Free,Net]BSD Unix ------