Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Jul 2014 22:17:42 +0200
From:      Joerg Wunsch <frebsd-scsi@uriah.heep.sax.de>
To:        freebsd-scsi@freebsd.org, "Kenneth D. Merry" <ken@FreeBSD.ORG>
Subject:   Re: Bacula fails on FreeBSD 10.x / "mt fsf" infinitely proceeds
Message-ID:  <20140731201742.GA4358@uriah.heep.sax.de>
In-Reply-To: <20140731091422.GA37239@uriah.heep.sax.de>
References:  <20140730060330.GA3272@uriah.heep.sax.de> <20140730153229.GA86368@nargothrond.kdm.org> <20140730191915.9B944267B@uriah.heep.sax.de> <20140730203315.0EED1295B@uriah.heep.sax.de> <20140730204200.4645729B8@uriah.heep.sax.de> <53D95F61.4080701@FreeBSD.org> <20140730215113.GA3564@uriah.heep.sax.de> <20140731035756.GA91452@nargothrond.kdm.org> <20140731060936.GB4095@uriah.heep.sax.de> <20140731091422.GA37239@uriah.heep.sax.de>

next in thread | previous in thread | raw e-mail | index | archive | help
As Joerg Wunsch wrote:

> Next attempt: in saerror(), rather than basing the decision whether
> this status report belongs to a read/write or control operation on
> some CCB flag that needs to be set explicitly, base it on the actual
> command that led to the status report (SA_READ or SA_WRITE
> vs. anything else).  A similar decision is already done in saerror().

Now, tested for real, too.

I am content with that patch, and would be willing to commit it.

Note that much of the changes there are whitespace changes only since
I removed a switch/case statement where Alexander Motin only left a
single case in, so a large block of code is unindented by one TAB now.

Here's a typescript of handling a real Bacula tape with the suggested
patch.

Script started on Thu Jul 31 21:58:26 2014
root@uriah:/tmp # mt stat
Mode      Density              Blocksize      bpi      Compression
Current:  0x41:DLTapeIV(40GB)    variable       98250    IDRC
---------available modes---------
0:        0x41:DLTapeIV(40GB)    variable       98250    IDRC
1:        0x41:DLTapeIV(40GB)    variable       98250    IDRC
2:        0x41:DLTapeIV(40GB)    variable       98250    IDRC
3:        0x41:DLTapeIV(40GB)    variable       98250    IDRC
---------------------------------
Current Driver State: at rest.
---------------------------------
File Number: 0	Record Number: 0	Residual Count 0
root@uriah:/tmp # mt fsf 32767
root@uriah:/tmp # mt stat
Mode      Density              Blocksize      bpi      Compression
Current:  0x41:DLTapeIV(40GB)    variable       98250    IDRC
---------available modes---------
0:        0x41:DLTapeIV(40GB)    variable       98250    IDRC
1:        0x41:DLTapeIV(40GB)    variable       98250    IDRC
2:        0x41:DLTapeIV(40GB)    variable       98250    IDRC
3:        0x41:DLTapeIV(40GB)    variable       98250    IDRC
---------------------------------
Current Driver State: at rest.
---------------------------------
File Number: 49	Record Number: 0	Residual Count 0
root@uriah:/tmp # mt errstat
Last I/O Residual: 0
 Last I/O Command: 08 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00
   Last I/O Sense:

	 F0 00 20 FF FF 24 00 16 00 00 00 01 00 00 00 00
	 00 00 80 08 B7 00 00 8B AB 00 96 30 C7 00 00 00
	
Last Control Residual: 0
 Last Control Command: 11 01 00 7F FF 00 00 00 00 00 00 00 00 00 00 00
   Last Control Sense:

	 F0 00 08 00 00 7F CE 16 00 0A 19 B2 00 05 00 00
	 00 00 80 08 B7 00 00 8B AB 00 18 C7 BA 00 00 00
	

root@uriah:/tmp # mt rewind
root@uriah:/tmp # exit
exit

Script done on Thu Jul 31 22:02:15 2014

-- 
cheers, Joerg               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/
Never trust an operating system you don't have sources for. ;-)



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