Subject: Re: kern/6434: compress/nocompress bit for tapes
To: Todd Vierling <tv@pobox.com>
From: Simon J. Gerraty <sjg@quick.com.au>
List: netbsd-bugs
Date: 11/16/1998 10:50:22
> Delivery-Date: Sat, 14 Nov 1998 04:02:54 +1100
> Received: (from uucp@localhost) by zen.quick.com.au (8.8.8/8.7.3) id EAA22008 for <sjg@quick.com.au>; Sat, 14 Nov 1998 04:02:53 +1100 (EST)
> Received: from like.duh.org(207.30.95.211), claiming to be "duhnet.net"
>  via SMTP by gate.quick.com.au, id smtpd21969a; Fri Nov 13 09:02:29 1998
> Received: from localhost (localhost [[UNIX: localhost]])
> 	by duhnet.net (8.9.1a/8.9.1/Duh-2.1.0) with SMTP id MAA17401Fri, 13 Nov 1998 12:02:20 -0500 (EST)
> X-Authentication-Warning: duhnet.net: tv owned process doing -bs
> Date: Fri, 13 Nov 1998 12:02:20 -0500 (EST)
> From: Todd Vierling <tv@pobox.com>
> X-Sender: tv@duhnet.net
> To: "Simon J. Gerraty" <sjg@quick.com.au>
> cc: gnats-bugs@gnats.netbsd.org, netbsd-bugs@netbsd.org
> Subject: Re: kern/6434: compress/nocompress bit for tapes
> In-Reply-To: <199811131156.WAA06033@zen.quick.com.au>
> Message-ID: <Pine.NEB.4.02.9811131201020.16714-100000@duhnet.net>
> MIME-Version: 1.0
> Content-Type: TEXT/PLAIN; charset=US-ASCII
> 
> On Fri, 13 Nov 1998, Simon J. Gerraty wrote:
> 
> : Just as there is a reserved bit in the tape device minor number to
> : control rewind/norewind, it would be very handy to have a bit that
> : controls whether compression is enabled or not.
> 
> What's wrong with "mt compress 1"/"mt compress 0"?

Nothing.  But it requires that everytime I feed a tape to Amanda
I need to run mt(1).  If /dev/nrst0c0 were a norewind,nocompress device
I could just configure Amanda to use that, and be sure that hw/
compression would not be used.

I agree that having a nocompress bit in the minor number might make 
"mt compress" less interesting, but that does not mean that a
nocompress bit is not the right thing.  Compression is the sort of
thing you turn on/off at the start of a mount session, so a minor bit
controll is quite applicable. 

In the interests of least surprise, it might be better to use two
bits in the minor number.

00 - nothing implied - use mt(1)
10 - compress off
11 - compress on

Thus /dev/nrst0 would continue to be have as it does.

--sjg