Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Aug 2002 09:20:01 -0700 (PDT)
From:      Matthew Jacob <mjacob@feral.com>
To:        Cejka Rudolf <cejkar@fit.vutbr.cz>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: EOT tape handling changed?
Message-ID:  <Pine.BSF.4.21.0208280912270.84177-100000@beppo>
In-Reply-To: <20020828131630.GA56946@fit.vutbr.cz>

next in thread | previous in thread | raw e-mail | index | archive | help

On Wed, 28 Aug 2002, Cejka Rudolf wrote:

> 
> Hi,
>   since the beginning of August my backup service stopped to work
> in FreeBSD-stable. Finally I understand why. With the revision
> scsi_sa.c:1.45.2.12 from Aug 2, the End of Tape is reported by
> result zero instead of previous -1/ENOSPC after write() call.
> 
> Now I have two "questions":
> 
> 1) Why it had to be changed at all? If I look into afbackup sources, it
>    seems that there is no other such OS, which returns written size 0
>    - it seems to me that atleast Solaris, AIX, Irix, Linux, OSF, HPUX,
>    OpenBSD and NetBSD all return an error -1 and they set errno to ENOSPC
>    (like when there is a full filesystem) or ENXIO. Can anybody confirm
>    it, if it is right?

I'm not sure that this is right. The NetBSD driver will do the same
behaviour at this point.

> 
> 2) Why it had been changed in -stable too? Why not only in -current?
>    It breaks atleast one backup program (afbackup), which has to be
>    fixed/patched now...

I'll look at this very high priority- but...

What I was doing was matching -stable (which has been broken wrt EOT
handling for years) to -current. My test program which expects to be
able to read exactly what it wrote pass with this change, fail with the
previous.

The problem is that you cannot return a residual if you return an error.
For tape drives that then write *partial* final records (e.g., if you
have EEW off), you cannot know exactly what you wrote. Therefore, when
you read things back, you end up with duplicated data when you do tape
spanning.

We can argue until the cows come home about whether this is correct or
not. We won't. I *do* agree that breaking 3rd party backup packages is a
problem. Let me do some thinking about how to address this.

-matt



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




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