From alex@alexwang.com  Tue Feb 18 07:22:42 2003
Return-Path: <alex@alexwang.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 2BECC37B405
	for <freebsd-gnats-submit@freebsd.org>; Tue, 18 Feb 2003 07:22:42 -0800 (PST)
Received: from alexwang.com (alexwang.com [61.218.0.204])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 158DF43F93
	for <freebsd-gnats-submit@freebsd.org>; Tue, 18 Feb 2003 07:22:41 -0800 (PST)
	(envelope-from alex@alexwang.com)
Received: (from root@localhost)
	by alexwang.com (8.12.6/8.12.6) id h1IFNDKT018725
	for freebsd-gnats-submit@freebsd.org; Tue, 18 Feb 2003 23:23:13 +0800 (CST)
Received: from alexwang.com (localhost.alexwang.com [127.0.0.1])
	by alexwang.com (8.12.6/8.12.6av) with ESMTP id h1IFN7cE018716
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 18 Feb 2003 23:23:08 +0800 (CST)
Received: (from root@localhost)
	by alexwang.com (8.12.6/8.12.6/Submit) id h1IFN5Q2018715;
	Tue, 18 Feb 2003 23:23:05 +0800 (CST)
Message-Id: <200302181523.h1IFN5Q2018715@alexwang.com>
Date: Tue, 18 Feb 2003 23:23:05 +0800 (CST)
From: Alex Wang <alex@alexwang.com>
Reply-To: Alex Wang <alex@alexwang.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Tape drive EOT handling problems in 4.7
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         48425
>Category:       kern
>Synopsis:       Tape drive EOT handling problems in 4.7
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 18 07:30:05 PST 2003
>Closed-Date:    Fri Jan 28 08:07:44 UTC 2011
>Last-Modified:  Fri Jan 28 08:07:44 UTC 2011
>Originator:     Alex Wang <alex@alexwang.com>
>Release:        FreeBSD 4.7-RELEASE i386
>Organization:
>Environment:
System: FreeBSD alexwang.com 4.7-RELEASE FreeBSD 4.7-RELEASE #0: Mon Oct 14 05:21:51 CST 2002 alex@alexwang.com:/usr/src/sys/compile/ALEX i386


	
>Description:
	
I backup some files in FreeBSD 4.6 and tried to restore to 4.7.
I found that there might be some EOT handling problem in 4.7.
There should be one filemark between different records.
But in 4.7, I get 2 EOT between 2 records (write() return 0 twice).
In 4.6, when reaching the end-of-tape, I would get 1 or 2 EOT
according to the EOT model setting and get a negative value
if I try to read() more. But in 4.7, I won't reach any negative
value but endless 0. Is this reasonable?

Further more, I tried to write some data to tape device in 4.7.
I got 2 EOT between 2 records. I then read that tape in 4.6, there
is only 1 EOT between different records.

After checking the cvs repository, The sys/cam/scsi/scsi_sa.c has
changed a lot in revision 1.45.2.12 which logged "lots of fixes 
for EOT handling.". I guess this is the reason that EOT behavior
changes.

I think the EOT behavior in 4.7 is very strange. It makes my tape
backup program confused.

BTW, I have tried HP dat40 and TANBERG SLR100 tape drive.

>How-To-Repeat:
	
>Fix:

	


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->freebsd-bugs 
Responsible-Changed-By: ceri 
Responsible-Changed-When: Tue Feb 18 10:30:02 PST 2003 
Responsible-Changed-Why:  
Reassign misfiled PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=48425 
State-Changed-From-To: open->closed 
State-Changed-By: remko 
State-Changed-When: Fri Jan 28 08:07:43 UTC 2011 
State-Changed-Why:  
In case this is still a problem please let me know, but given the age of 
the ticket, I am not very sure whether it would be reproducable at all. 

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