NetBSD Problem Report #454
From gnats Fri Sep 2 13:55:21 1994
Received: from skarven.dsl.unit.no (0@skarven.dsl.unit.no [129.241.36.65]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with ESMTP id NAA01503 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Fri, 2 Sep 1994 13:55:17 -0700
Message-Id: <199409022056.WAA01072@skarven.dsl.unit.no>
Date: Fri, 2 Sep 1994 22:56:32 +0200
From: Arne H Juul <arnej@dsl.unit.no>
Reply-To: arnej@dsl.unit.no
To: gnats-bugs@sun-lamp.cs.berkeley.edu
Subject: tunefs should be able to report current parameters
X-Send-Pr-Version: 3.2
>Number: 454
>Category: bin
>Synopsis: tunefs can only change parameters, not report them.
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: gnats-admin
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Fri Sep 02 14:05:00 +0000 1994
>Closed-Date: Mon Sep 05 00:29:34 +0000 1994
>Last-Modified:
>Originator: Arne H Juul
>Release:
>Organization:
University of Trondheim, Norway
>Environment:
NetBSD-current as of yesterday
System: NetBSD skarven.dsl.unit.no 1.0_BETA NetBSD 1.0_BETA (SKARVEN) #2: Sun Jul 31 16:32:24 MET DST 1994 arnej@skarven.dsl.unit.no:/usr/src/sys/arch/i386/compile/SKARVEN i386
>Description:
If you want to find out what one of the tunable parameters are
without changing it, you have to change it and then change it
back.
>How-To-Repeat:
tunefs
# and read the usage message
>Fix:
Here's a patch that adds an -R option, documents it and the
-A flag, and gives a more normal usage message. tunefs could
probably also be converted to use getopt() - do you want me to
look into this?
diff -rcP /usr/src/sbin/tunefs/tunefs.8 ./sbin/tunefs/tunefs.8
*** /usr/src/sbin/tunefs/tunefs.8 Thu Jun 9 12:11:39 1994
--- ./sbin/tunefs/tunefs.8 Thu Sep 1 14:01:42 1994
***************
*** 40,45 ****
--- 40,47 ----
.Nd tune up an existing file system
.Sh SYNOPSIS
.Nm tunefs
+ .Op Fl A
+ .Op Fl R
.Op Fl a Ar maxcontig
.Op Fl d Ar rotdelay
.Op Fl e Ar maxbpg
***************
*** 55,60 ****
--- 57,66 ----
The parameters which are to be changed are indicated by the flags
given below:
.Bl -tag -width Ds
+ .It Fl A
+ Also update the alternate superblocks.
+ .It Fl R
+ Report the current values.
.It Fl a Ar maxcontig
This specifies the maximum number of contiguous blocks that will
be laid out before forcing a rotational delay (see
diff -rcP /usr/src/sbin/tunefs/tunefs.c ./sbin/tunefs/tunefs.c
*** /usr/src/sbin/tunefs/tunefs.c Thu Jun 9 12:11:39 1994
--- ./sbin/tunefs/tunefs.c Thu Sep 1 14:01:09 1994
***************
*** 114,119 ****
--- 114,140 ----
for (cp = &argv[0][1]; *cp; cp++)
switch (*cp) {
+ case 'R':
+ name = "maximum contiguous block count";
+ warnx("%s is %d", name, sblock.fs_maxcontig);
+ name =
+ "rotational delay between contiguous blocks";
+ warnx("%s is %d", name, sblock.fs_rotdelay);
+ name =
+ "maximum blocks per file in a cylinder group";
+ warnx("%s is %d", name, sblock.fs_maxbpg);
+ name = "minimum percentage of free space";
+ warnx("%s is %d", name, sblock.fs_minfree);
+ name = "optimization preference";
+ chg[FS_OPTSPACE] = "space";
+ chg[FS_OPTTIME] = "time";
+ warnx("%s is %s", name,
+ ((sblock.fs_optim == FS_OPTSPACE)
+ || (sblock.fs_optim == FS_OPTTIME)) ?
+ chg[sblock.fs_optim] :
+ "unknown");
+ continue;
+
case 'A':
Aflag++;
continue;
***************
*** 227,239 ****
usage()
{
! fprintf(stderr, "Usage: tunefs tuneup-options special-device\n");
! fprintf(stderr, "where tuneup-options are:\n");
! fprintf(stderr, "\t-a maximum contiguous blocks\n");
! fprintf(stderr, "\t-d rotational delay between contiguous blocks\n");
! fprintf(stderr, "\t-e maximum blocks per file in a cylinder group\n");
! fprintf(stderr, "\t-m minimum percentage of free space\n");
! fprintf(stderr, "\t-o optimization preference (`space' or `time')\n");
exit(2);
}
--- 248,256 ----
usage()
{
! fprintf(stderr, "usage: tunefs [-AR] [-a maxcontig] [-o optpref]\n");
! fprintf(stderr, " [-d rotdelay] [-e maxbpg] ");
! fprintf(stderr, "[-m minfree] device\n");
exit(2);
}
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: mycroft
State-Changed-When: Sun Sep 4 17:29:34 PDT 1994
State-Changed-Why:
Use dumpfs(8).
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.