Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Dec 1997 20:50:29 +0100 (MET)
From:      Wilko Bulte <wilko@yedi.iaf.nl>
To:        joerg_wunsch@uriah.heep.sax.de
Cc:        scsi@FreeBSD.ORG
Subject:   Re: Questions about mt and SCSI subsystem
Message-ID:  <199712111950.UAA08924@yedi.iaf.nl>
In-Reply-To: <19971211101003.17782@uriah.heep.sax.de> from "J Wunsch" at Dec 11, 97 10:10:03 am

next in thread | previous in thread | raw e-mail | index | archive | help
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  ------



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