From owner-freebsd-stable Wed Aug 28 9:20:23 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F280D37B401 for ; Wed, 28 Aug 2002 09:20:18 -0700 (PDT) Received: from beppo.feral.com (beppo.feral.com [192.67.166.79]) by mx1.FreeBSD.org (Postfix) with ESMTP id EC05D43E42 for ; Wed, 28 Aug 2002 09:20:17 -0700 (PDT) (envelope-from mjacob@feral.com) Received: from mailhost.feral.com (mjacob@mailhost.feral.com [192.67.166.1]) by beppo.feral.com (8.11.3/8.11.3) with ESMTP id g7SGK1Y92129; Wed, 28 Aug 2002 09:20:01 -0700 (PDT) (envelope-from mjacob@feral.com) Date: Wed, 28 Aug 2002 09:20:01 -0700 (PDT) From: Matthew Jacob X-Sender: mjacob@beppo Reply-To: mjacob@feral.com To: Cejka Rudolf Cc: freebsd-stable@freebsd.org Subject: Re: EOT tape handling changed? In-Reply-To: <20020828131630.GA56946@fit.vutbr.cz> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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