diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2014-05-29 12:02:51 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2014-05-29 12:02:51 +0000 |
commit | f5ac28745ff831ff91a1c2aedb32eedfec92d13a (patch) | |
tree | dcf6f9c03fe623540fb9d8f52af5160aa333df71 /sys | |
parent | 460364710c8e88762893a2039aba177087b2b897 (diff) |
fsck should use the same values in checking as newfs does in creating
a filesystem. fs_nspf and its derivitives like fs_spc are DEV_BSIZE
values, not actual hardware disk sector values. Adjust initializations
accordingly.
Tweak header and man page comments to make the DEV_BSIZE'ness more
obvious for future spelunkers.
No-op for DEV_BSIZE (a.k.a. 512-byte) sector devices but should help
checking filesystems on, e.g., 4k-byte sector devices.
ok jmc@ on the man page tweaks.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/ufs/ffs/fs.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/ufs/ffs/fs.h b/sys/ufs/ffs/fs.h index 95e44832df1..98aa23006d3 100644 --- a/sys/ufs/ffs/fs.h +++ b/sys/ufs/ffs/fs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: fs.h,v 1.39 2013/11/12 14:20:52 krw Exp $ */ +/* $OpenBSD: fs.h,v 1.40 2014/05/29 12:02:50 krw Exp $ */ /* $NetBSD: fs.h,v 1.6 1995/04/12 21:21:02 mycroft Exp $ */ /* @@ -224,12 +224,12 @@ struct fs { int32_t fs_csshift; /* csum block number (now unused) */ int32_t fs_nindir; /* value of NINDIR */ int32_t fs_inopb; /* inodes per file system block */ - int32_t fs_nspf; /* value of NSPF */ + int32_t fs_nspf; /* DEV_BSIZE sectors per frag */ /* yet another configuration parameter */ int32_t fs_optim; /* optimization preference, see below */ /* these fields are derived from the hardware */ - int32_t fs_npsect; /* # sectors/track including spares */ - int32_t fs_interleave; /* hardware sector interleave */ + int32_t fs_npsect; /* DEV_BSIZE sectors/track + spares */ + int32_t fs_interleave; /* DEV_BSIZE sector interleave */ int32_t fs_trackskew; /* sector 0 skew, per track */ /* fs_id takes the space of the unused fs_headswitch and fs_trkseek fields */ int32_t fs_id[2]; /* unique filesystem id */ @@ -239,8 +239,8 @@ struct fs { int32_t fs_cgsize; /* cyl grp block size / bytes */ /* these fields are derived from the hardware */ int32_t fs_ntrak; /* tracks per cylinder */ - int32_t fs_nsect; /* sectors per track */ - int32_t fs_spc; /* sectors per cylinder */ + int32_t fs_nsect; /* DEV_BSIZE sectors per track */ + int32_t fs_spc; /* DEV_BSIZE sectors per cylinder */ /* this comes from the disk driver partitioning */ int32_t fs_ncyl; /* cylinders in file system */ /* these fields can be computed from the others */ |