From loyer@quickstep.ensta.fr  Sun Feb 14 10:05:19 1999
Received: from ensta.ensta.fr (ensta.ensta.fr [147.250.1.1])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA19914
          for <FreeBSD-gnats-submit@freebsd.org>; Sun, 14 Feb 1999 10:05:16 -0800 (PST)
          (envelope-from loyer@quickstep.ensta.fr)
Received: from quickstep.ensta.fr (quickstep.ensta.fr [147.250.61.100])
	by ensta.ensta.fr (8.8.5/8.8.5) with ESMTP id TAA23447
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 14 Feb 1999 19:05:14 +0100 (MET)
Received: (from loyer@localhost)
	by quickstep.ensta.fr (8.9.1/8.8.5) id RAA08065;
	Sat, 13 Feb 1999 17:08:08 +0100 (CET)
Message-Id: <199902131608.RAA08065@quickstep.ensta.fr>
Date: Sat, 13 Feb 1999 17:08:08 +0100 (CET)
From: Frederic LOYER <loyer@ensta.fr>
Reply-To: loyer@ensta.fr
To: FreeBSD-gnats-submit@freebsd.org
Subject: ATAPI tape driver (wst) doesn't handle End Of Media error
X-Send-Pr-Version: 3.2

>Number:         10089
>Category:       i386
>Synopsis:       ATAPI tape driver (wst) doesn't handle End Of Media error
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    sos
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb 14 10:10:00 PST 1999
>Closed-Date:    Tue Nov 14 00:37:18 PST 2000
>Last-Modified:  Tue Nov 14 00:38:01 PST 2000
>Originator:     Frederic LOYER
>Release:        FreeBSD 3.0-RELEASE i386
>Organization:
ENSTA - Ecole Nationale Superieure de Techniques Avancees
>Environment:

FreeBSD 3.0-RELEASE i386

>Description:

When writing to a tape, an EIO error is returned at the end of the media.
This prevents multi-volume dumps.

>How-To-Repeat:

dump 0abf 32 /dev/nrwst0 /usr

where  /usr is a file system which can't be contained in a single tape.

>Fix:

In the src/sys/i386/isa directory, apply the folowing patch:

The switch statement could be replaced by an "if" one. I prefer
a switch, thinking of adding perhaps one other error type (such as
AER_MCR, media change requested)

*** wst.c.orig  Sat Feb 13 11:52:35 1999
--- wst.c       Sat Feb 13 12:15:24 1999
***************
*** 503,509 ****
      if (result.code) {
        printf("wst_done: ");
          wst_error(t, result);
!         bp->b_error = EIO;
          bp->b_flags |= B_ERROR;
      }
      else
--- 503,515 ----
      if (result.code) {
        printf("wst_done: ");
          wst_error(t, result);
!       switch (result.error) {
!       case AER_EOM:
!           bp->b_error = ENOSPC;
!           break;
!       default:
!           bp->b_error = EIO;
!       }
          bp->b_flags |= B_ERROR;
      }
      else

>Release-Note:
>Audit-Trail:

From: Frederic LOYER <loyer@ensta.fr>
To: freebsd-gnats-submit@freebsd.org, loyer@ensta.fr
Cc:  
Subject: Re: i386/10089: ATAPI tape driver (wst) doesn't handle End Of Media error
Date: Tue, 16 Feb 1999 20:24:42 +0100

 Oops! This seems to easy! We should check if the EOM condition have been
 "RECOVERED".
 
 This condition could come from an "early warning" (ENOSPC should be
 returned) or real EOM (EIO should be returned).
 
State-Changed-From-To: open->feedback 
State-Changed-By: johan 
State-Changed-When: Sun Sep 17 03:34:31 PDT 2000 
State-Changed-Why:  
The wst driver has been replaced by the ast driver in 
more recent version of FreeBSD. 

Can you please try if the problem still exists in the new driver 
and report back if it works or not. 



Responsible-Changed-From-To: freebsd-bugs->sos 
Responsible-Changed-By: johan 
Responsible-Changed-When: Sun Sep 17 03:34:31 PDT 2000 
Responsible-Changed-Why:  
Over to Sren who once wrote wst and now maintains the ata code. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=10089 
State-Changed-From-To: feedback->closed 
State-Changed-By: sos 
State-Changed-When: Tue Nov 14 00:37:18 PST 2000 
State-Changed-Why:  
No feedback recieved in a looong time, belived to be fixed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=10089 
>Unformatted:
