Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Dec 1997 00:46:50 +0100
From:      J Wunsch <j@uriah.heep.sax.de>
To:        scsi@freebsd.org
Subject:   Re: Questions about mt and SCSI subsystem
Message-ID:  <19971212004650.09374@uriah.heep.sax.de>
In-Reply-To: <199712111641.IAA20249@math.berkeley.edu>; from Dan Strick on Thu, Dec 11, 1997 at 08:41:03AM -0800
References:  <199712111641.IAA20249@math.berkeley.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
As Dan Strick wrote:

> In my opinion, short writes should not be allowed.  The driver should
> return an error in such circumstances.

So how are you going to find out how much actual space there still has
been in this case?  Don't think of variable-length recording tapes in
the first place, and assume the caller wanted to write 10 KB (aka. 20
blocks 512 bytes each).  There were only 8 blocks free on the tape.
How do you express this if you reject the complete write call, as
opposed to writing 4 KB worth of data, and returning this to the
caller?

Btw., even if you want, you IMHO can't.  You write them block by block
to the tape, and get the EOM notification of the drive only after
having written 4 KB of data.  So, the data are actually there on the
medium already, pretending to the caller they weren't would confuse
the heck out of the volume-span logic of the corresponding program,
when trying to read across the end of this volume.  The only solution
seems to be a `short write'.

-- 
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. ;-)



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