From owner-freebsd-bugs Wed Feb 27 18:30: 9 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 2292E37B417 for ; Wed, 27 Feb 2002 18:30:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g1S2U1r62159; Wed, 27 Feb 2002 18:30:01 -0800 (PST) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 4076B37B41D for ; Wed, 27 Feb 2002 18:26:08 -0800 (PST) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g1S2Q8a60222; Wed, 27 Feb 2002 18:26:08 -0800 (PST) (envelope-from nobody) Message-Id: <200202280226.g1S2Q8a60222@freefall.freebsd.org> Date: Wed, 27 Feb 2002 18:26:08 -0800 (PST) From: Martin Aherron To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: kern/35392: atapi tape driver does not maintain device state flags across a close Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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