summaryrefslogtreecommitdiffstats
path: root/sbin/newfs
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1994-10-09 20:10:56 +0000
committerdg <dg@FreeBSD.org>1994-10-09 20:10:56 +0000
commit0c0e5e4cbf54b34e02183e61af87b14ca5904e05 (patch)
tree60a09e59c459f5e20c0ccf2e3399719b103159bf /sbin/newfs
parent5648fa5d60e27f1af9c1f335a720af1f00d2d7fa (diff)
downloadFreeBSD-src-0c0e5e4cbf54b34e02183e61af87b14ca5904e05.zip
FreeBSD-src-0c0e5e4cbf54b34e02183e61af87b14ca5904e05.tar.gz
Backed out part of the last change that prevents the rpos table from
being output if <= 1 rpos; there is a bug in the kernel which doesn't quite get along with this. Changed default #rpos to 1, and fixed up manual page. Converted nrpos to 1 if user specifies 0.
Diffstat (limited to 'sbin/newfs')
-rw-r--r--sbin/newfs/mkfs.c2
-rw-r--r--sbin/newfs/newfs.82
-rw-r--r--sbin/newfs/newfs.c10
3 files changed, 8 insertions, 6 deletions
diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c
index 9d71c20..398f369 100644
--- a/sbin/newfs/mkfs.c
+++ b/sbin/newfs/mkfs.c
@@ -443,7 +443,7 @@ mkfs(pp, fsys, fi, fo)
sblock.fs_npsect = nphyssectors;
sblock.fs_postblformat = FS_DYNAMICPOSTBLFMT;
sblock.fs_sbsize = fragroundup(&sblock, sizeof(struct fs));
- if (sblock.fs_ntrak == 1 || sblock.fs_nrpos <= 1) {
+ if (sblock.fs_ntrak == 1) {
sblock.fs_cpc = 0;
goto next;
}
diff --git a/sbin/newfs/newfs.8 b/sbin/newfs/newfs.8
index 0832a87..90be62d 100644
--- a/sbin/newfs/newfs.8
+++ b/sbin/newfs/newfs.8
@@ -168,7 +168,7 @@ See
for more details on how to set this option.
.It Fl n Ar number of distinguished rotational positions
Determines how many rotational time slots there are in one revolution of
-the disk. Defaults to 0, which disables the rotational position table.
+the disk. Defaults to 1, which escentially disables the rotational position table.
.It Fl o Ar optimization\ preference
.Pq ``space'' or ``time''
The file system can either be instructed to try to minimize the time spent
diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c
index 62fde30..c419c30 100644
--- a/sbin/newfs/newfs.c
+++ b/sbin/newfs/newfs.c
@@ -138,11 +138,11 @@ void fatal();
* rotational positions that we distinguish. With NRPOS of 8 the resolution
* of our summary information is 2ms for a typical 3600 rpm drive.
*
- * ...but now we make this 1 (which disables the rotational position table)
- * because modern drives with read-ahead and write-behind do better without
- * the rotational position table.
+ * ...but now we make this 1 (which escentially disables the rotational
+ * position table because modern drives with read-ahead and write-behind do
+ * better without the rotational position table.
*/
-#define NRPOS 0 /* number distinct rotational positions */
+#define NRPOS 1 /* number distinct rotational positions */
int mfs; /* run as the memory based filesystem */
@@ -282,6 +282,8 @@ main(argc, argv)
if ((nrpos = atoi(optarg)) < 0)
fatal("%s: bad rotational layout count\n",
optarg);
+ if (nrpos == 0)
+ nrpos = 1;
break;
case 'o':
if (mfs)
OpenPOWER on IntegriCloud