diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2007-04-03 18:42:33 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2007-04-03 18:42:33 +0000 |
commit | 793e25bb2967feec5656d474903cc5b6882fb350 (patch) | |
tree | 90711d0e0d04ca2369142294b8aa1dddab8a6a8c /sbin/newfs | |
parent | 6f381b7e2606a16f389f3aac9281aea3c330ec3e (diff) |
Remove obsolete options for superblock fields that are no longer used.
OK deraadt @, OK in principle tedu@
Diffstat (limited to 'sbin/newfs')
-rw-r--r-- | sbin/newfs/mkfs.c | 14 | ||||
-rw-r--r-- | sbin/newfs/newfs.8 | 31 | ||||
-rw-r--r-- | sbin/newfs/newfs.c | 45 |
3 files changed, 9 insertions, 81 deletions
diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c index c6116f2072b..85f82882690 100644 --- a/sbin/newfs/mkfs.c +++ b/sbin/newfs/mkfs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mkfs.c,v 1.53 2007/04/03 17:08:30 millert Exp $ */ +/* $OpenBSD: mkfs.c,v 1.54 2007/04/03 18:42:32 millert Exp $ */ /* $NetBSD: mkfs.c,v 1.25 1995/06/18 21:35:38 cgd Exp $ */ /* @@ -74,9 +74,6 @@ extern int ntracks; /* # tracks/cylinder */ extern int nsectors; /* # sectors/track */ extern int secpercyl; /* sectors per cylinder */ extern int sectorsize; /* bytes/sector */ -extern int rpm; /* revolutions/minute of drive */ -extern int interleave; /* hardware sector interleave */ -extern int trackskew; /* sector 0 skew, per track */ extern int fsize; /* fragment size */ extern int bsize; /* block size */ extern int cpg; /* cylinders/cylinder group */ @@ -85,7 +82,6 @@ extern int minfree; /* free space threshold */ extern int opt; /* optimization preference (space or time) */ extern int density; /* number of bytes per inode */ extern int maxcontig; /* max contiguous blocks to allocate */ -extern int rotdelay; /* rotational delay between blocks */ extern int maxbpg; /* maximum blocks per file in a cyl group */ extern int bbsize; /* boot block size */ extern int sbsize; /* superblock size */ @@ -481,8 +477,8 @@ recalc: * are not powers of two, because more cylinders must be described * by the tables before the rotational pattern repeats (fs_cpc). */ - sblock.fs_interleave = interleave; - sblock.fs_trackskew = trackskew; + sblock.fs_interleave = 1; + sblock.fs_trackskew = 0; sblock.fs_npsect = sblock.fs_nsect; sblock.fs_postblformat = FS_DYNAMICPOSTBLFMT; sblock.fs_sbsize = fragroundup(&sblock, sizeof(struct fs)); @@ -572,11 +568,11 @@ next: if ((fscs = calloc(1, sblock.fs_cssize)) == NULL) err(1, "cg summary"); sblock.fs_magic = FS_MAGIC; - sblock.fs_rotdelay = rotdelay; + sblock.fs_rotdelay = 0; sblock.fs_minfree = minfree; sblock.fs_maxcontig = maxcontig; sblock.fs_maxbpg = maxbpg; - sblock.fs_rps = rpm / 60; + sblock.fs_rps = 3600 / 60; sblock.fs_optim = opt; sblock.fs_cgrotor = 0; sblock.fs_ffs1_cstotal.cs_ndir = 0; diff --git a/sbin/newfs/newfs.8 b/sbin/newfs/newfs.8 index 34fb154f2de..797dbcdc0b9 100644 --- a/sbin/newfs/newfs.8 +++ b/sbin/newfs/newfs.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: newfs.8,v 1.50 2007/04/02 20:20:39 millert Exp $ +.\" $OpenBSD: newfs.8,v 1.51 2007/04/03 18:42:32 millert Exp $ .\" $NetBSD: newfs.8,v 1.12 1995/03/18 14:58:41 cgd Exp $ .\" .\" Copyright (c) 1983, 1987, 1991, 1993, 1994 @@ -43,17 +43,13 @@ .Op Fl a Ar maxcontig .Op Fl b Ar block-size .Op Fl c Ar cylinders -.Op Fl d Ar rotdelay .Op Fl e Ar maxbpg .Op Fl f Ar frag-size .Op Fl g Ar avgfilesize .Op Fl h Ar avgfpdir .Op Fl i Ar bytes -.Op Fl k Ar skew -.Op Fl l Ar interleave .Op Fl m Ar free-space .Op Fl o Ar optimization -.Op Fl r Ar revolutions .Op Fl S Ar sector-size .Op Fl s Ar size .Op Fl t Ar fstype @@ -67,7 +63,6 @@ .Op Fl a Ar maxcontig .Op Fl b Ar block-size .Op Fl c Ar cylinders -.Op Fl d Ar rotdelay .Op Fl e Ar maxbpg .Op Fl f Ar frag-size .Op Fl i Ar bytes @@ -152,13 +147,6 @@ The default is 16KB. .It Fl c Ar cylinders The number of cylinders per cylinder group in a file system. The default is to use as many as fit with the other parameters given. -.It Fl d Ar rotdelay -This specifies the expected time (in milliseconds) to service a transfer -completion interrupt and initiate a new transfer on the same disk. -The default is 0 milliseconds. -See -.Xr tunefs 8 -for more details on how to set this option. .It Fl e Ar maxbpg This indicates the maximum number of blocks any single file can allocate out of a cylinder group before it is forced to begin @@ -241,23 +229,6 @@ it impossible for .Xr fsck 8 to find the alternate superblocks if the standard superblock is lost. .Bl -tag -width Fl -.It Fl k Ar skew -Used to describe perturbations in the media format to compensate for -a slow controller. -Track skew is the offset of sector 0 on track N relative to sector 0 -on track N\-1 on the same cylinder. -.It Fl l Ar interleave -Used to describe perturbations in the media format to compensate for -a slow controller. -Interleave is physical sector interleave on each track, -specified as the denominator of the ratio: -.Dl sectors read/sectors passed over -Thus an interleave of 1/1 implies contiguous layout, while 1/2 implies -logical sector 0 is separated by one sector from logical sector 1. -.Pq Fl u -since they are not available to the file system for data allocation. -.It Fl r Ar revolutions -The speed of the disk in revolutions per minute. .It Fl S Ar sector-size The size of a sector in bytes (almost never anything but 512). .It Fl t Ar fstype diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c index e0871585951..02d54d94db7 100644 --- a/sbin/newfs/newfs.c +++ b/sbin/newfs/newfs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: newfs.c,v 1.54 2007/04/03 17:08:30 millert Exp $ */ +/* $OpenBSD: newfs.c,v 1.55 2007/04/03 18:42:32 millert Exp $ */ /* $NetBSD: newfs.c,v 1.20 1996/05/16 07:13:03 thorpej Exp $ */ /* @@ -114,9 +114,6 @@ int nsectors; /* # sectors/track */ int secpercyl; /* sectors per cylinder */ int sectorsize; /* bytes/sector */ int realsectorsize; /* bytes/sector in hardware */ -int rpm; /* revolutions/minute of drive */ -int interleave; /* hardware sector interleave */ -int trackskew = -1; /* sector 0 skew, per track */ int fsize = 0; /* fragment size */ int bsize = 0; /* block size */ int cpg; /* cylinders/cylinder group */ @@ -126,7 +123,6 @@ int opt = DEFAULTOPT; /* optimization preference (space or time) */ int reqopt = -1; /* opt preference has not been specified */ int density; /* number of bytes per inode */ int maxcontig = 0; /* max contiguous blocks to allocate */ -int rotdelay = 0; /* rotational delay between blocks */ int maxbpg; /* maximum blocks per file in a cyl group */ int avgfilesize = AVFILESIZ;/* expected average file size */ int avgfilesperdir = AFPDIR;/* expected number of files per directory */ @@ -186,8 +182,8 @@ main(int argc, char *argv[]) fatal("insane maxpartitions value %d", maxpartitions); opstring = mfs ? - "P:T:a:b:c:d:e:f:i:m:o:s:" : - "NOS:T:a:b:c:d:e:f:g:h:i:k:l:m:o:qr:s:t:u:z:"; + "P:T:a:b:c:e:f:i:m:o:s:" : + "NOS:T:a:b:c:e:f:g:h:i:m:o:qs:t:u:z:"; while ((ch = getopt(argc, argv, opstring)) != -1) { switch (ch) { case 'N': @@ -217,10 +213,6 @@ main(int argc, char *argv[]) fatal("%s: bad cylinders/group", optarg); cpgflg++; break; - case 'd': - if ((rotdelay = atoi(optarg)) < 0) - fatal("%s: bad rotational delay\n", optarg); - break; case 'e': if ((maxbpg = atoi(optarg)) <= 0) fatal("%s: bad blocks per file in a cylinder group\n", @@ -242,14 +234,6 @@ main(int argc, char *argv[]) if ((density = atoi(optarg)) <= 0) fatal("%s: bad bytes per inode\n", optarg); break; - case 'k': - if ((trackskew = atoi(optarg)) < 0) - fatal("%s: bad track skew", optarg); - break; - case 'l': - if ((interleave = atoi(optarg)) <= 0) - fatal("%s: bad interleave", optarg); - break; case 'm': if ((minfree = atoi(optarg)) < 0 || minfree > 99) fatal("%s: bad free space %%\n", optarg); @@ -270,10 +254,6 @@ main(int argc, char *argv[]) case 'q': quiet = 1; break; - case 'r': - if ((rpm = atoi(optarg)) <= 0) - fatal("%s: bad revolutions/minute\n", optarg); - break; case 's': if ((fssize = atoi(optarg)) <= 0) fatal("%s: bad file system size", optarg); @@ -439,11 +419,6 @@ havelabel: if (fssize > pp->p_size && !mfs) fatal("%s: maximum file system size on the `%c' partition is %d", argv[0], *cp, pp->p_size); - if (rpm == 0) { - rpm = lp->d_rpm; - if (rpm <= 0) - rpm = 3600; - } if (ntracks == 0) { ntracks = lp->d_ntracks; if (ntracks <= 0) @@ -459,16 +434,6 @@ havelabel: if (sectorsize <= 0) fatal("%s: no default sector size", argv[0]); } - if (trackskew == -1) { - trackskew = lp->d_trackskew; - if (trackskew < 0) - trackskew = 0; - } - if (interleave == 0) { - interleave = lp->d_interleave; - if (interleave <= 0) - interleave = 1; - } if (fsize == 0) { fsize = pp->p_fsize; if (fsize <= 0) @@ -732,18 +697,14 @@ struct fsoptions { { "-a maximum contiguous blocks", 1 }, { "-b block size", 1 }, { "-c cylinders/group", 1 }, - { "-d rotational delay between contiguous blocks", 1 }, { "-e maximum blocks per file in a cylinder group", 1 }, { "-f frag size", 1 }, { "-g average file size", 0 }, { "-h average files per directory", 0 }, { "-i number of bytes per inode", 1 }, - { "-k sector 0 skew, per track", 0 }, - { "-l hardware sector interleave", 0 }, { "-m minimum free space %%", 1 }, { "-n number of distinguished rotational positions", 0 }, { "-o optimization preference (`space' or `time')", 1 }, - { "-r revolutions/minute", 0 }, { "-s file system size (sectors)", 1 }, { "-t file system type", 0 }, { "-u sectors/track", 0 }, |