From owner-freebsd-scsi Sat Mar 13 1:20:48 1999 Delivered-To: freebsd-scsi@freebsd.org Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by hub.freebsd.org (Postfix) with ESMTP id ED1A414C90 for ; Sat, 13 Mar 1999 01:20:45 -0800 (PST) (envelope-from j@uriah.heep.sax.de) Received: (from uucp@localhost) by sax.sax.de (8.8.8/8.8.8) with UUCP id KAA09940 for freebsd-scsi@FreeBSD.ORG; Sat, 13 Mar 1999 10:20:26 +0100 (CET) (envelope-from j@uriah.heep.sax.de) Received: (from j@localhost) by uriah.heep.sax.de (8.9.1/8.9.1) id KAA12534; Sat, 13 Mar 1999 10:13:50 +0100 (MET) (envelope-from j) Message-ID: <19990313101349.51196@uriah.heep.sax.de> Date: Sat, 13 Mar 1999 10:13:49 +0100 From: J Wunsch To: freebsd-scsi@FreeBSD.ORG Subject: Re: Strange SCSI QIC tape behaviour Reply-To: Joerg Wunsch References: <199903121057.UAA24445@nymph.detir.qld.gov.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.88 In-Reply-To: ; from Matthew Jacob on Fri, Mar 12, 1999 at 08:39:59AM -0800 X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org As Matthew Jacob wrote: > Yes, that's a bug for me to address. Where is this piece of > information from? I'd guess it's from the Tandberg manual. They are going great length to explain all the underlying concepts of QIC tapes, their block sizes etc. In a short summary: . QIC <= 150 uses 512-byte physical blocks . QIC >= 320 uses 1024-byte physical blocks (with 14 of them each being grouped into a frame, where frames are written as a single unit to the tape) . The Tandberg drives always support variable-length recording, where the logical block length can be 1..65535 for QIC <= 150, and 1..16MB for QIC >= 320. . The drives always support fixed-length recording with either 512, or for QIC >= 320 also 1024 bytes per block. For QIC >= 320, two logical 512 byte blocks will share one 1024-byte physical block. . Variable-length recording is basically an illusion that hides the underlying physical blocking. For QIC <= 150, this is very expensive, since a single tape block (512 bytes) is used for each variable-length logical block in order to record the block length, followed by the actual data blocks. This explains why nobody's going to use it. For QIC >= 320, the logical block length is apparently stored outside the physical tape block, so the efficiency of variable-length operation is high as long as the logical block size is a multiple of the physical blocksize (1024 bytes). That also explains why QIC >= 320 is commonly used with variable-length logical blocking. OTOH, setting the FIX bit, and using 1024-byte fixed blocks might IMHO increase the performance for them (since with the FIX bit set, you can specify multiple tape blocks in one SCSI command). I don't know whether anybody else could really read them, however. ;-) Btw., the Tandberg drives also have an option to enable the overwrite feature. Setting bit 4 in byte 8 on mode page 0x20 enables this (called EOWR). The comment says: ``Whe this bit is set the Drive will simulate the TAR (1/2" reel-to-reel) overwrite feature. The overwrite function can be used to overwrite data after the first data block on the tape or to overwrite two sequential filemarks before EOD. To overwrite data block(s) on the tape, the following cases must be satisfied: The tape must be positioned after the 1st logical block on the tape. If variable block, the logical block must not be more than 65534 (FFFEh) bytes. There are no filemarks so far on the tape and the next block from the tape is a data block. To overwrite a filemark, the following cases must be satisfied: The tape must be positioned at the 2nd of two sequential filemarks right in front of EOD. That means there are no data blocks following the filemarks. In this case overwrite from EOD will be allowed and the filemark cancel block will be written as the first block. ...'' -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message