Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Feb 2002 18:26:08 -0800 (PST)
From:      Martin Aherron <martin@cybernetics.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/35392: atapi tape driver does not maintain device state flags across a close
Message-ID:  <200202280226.g1S2Q8a60222@freefall.freebsd.org>

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


>Number:         35392
>Category:       kern
>Synopsis:       atapi tape driver does not maintain device state flags across a close
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 27 18:30:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Martin Aherron
>Release:        4.5-STABLE
>Organization:
Cybernetics
>Environment:
4.5-STABLE FreeBSD 4.5-STABLE #19: Wed Feb 27 16:37:40 EST 2002 .....  i386
>Description:
$FreeBSD: src/sys/dev/ata/atapi-tape.c,
v 1.36.2.9 2002/01/02 15:30:23 sos Exp $

astclose() improperly clears the device state flags when exiting. 
Fails to remember tape is write protected.
Breaks OnStream support.    
>How-To-Repeat:
      
>Fix:
*** atapi-tape.c.orig	Wed Feb 27 20:31:10 2002
--- atapi-tape.c	Wed Feb 27 20:34:22 2002
*************** astclose(dev_t dev, int flags, int fmt,
*** 293,299 ****
      if (stp->cap.lock && count_dev(dev) == 1)
  	ast_prevent_allow(stp, 0);

!     stp->flags &= F_CTL_WARN;
  #ifdef AST_DEBUG
      printf("ast%d: %llu total bytes transferred\n", stp->lun, ast_total);
  #endif
--- 293,299 ----
      if (stp->cap.lock && count_dev(dev) == 1)
  	ast_prevent_allow(stp, 0);

!     stp->flags &= ~F_CTL_WARN;
  #ifdef AST_DEBUG
      printf("ast%d: %llu total bytes transferred\n", stp-lun, ast_total);
  #endif
      
>Release-Note:
>Audit-Trail:
>Unformatted:

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




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