diff options
author | delphij <delphij@FreeBSD.org> | 2005-02-20 08:02:15 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2005-02-20 08:02:15 +0000 |
commit | b62e1ca825bfc519be7b8934f4184f9b0fe96e9e (patch) | |
tree | cacb781306afa3ef7a585d142dfcfeee26259805 /sys/ufs/ffs/fs.h | |
parent | df2cf6c4d1ca8e709672406f2c2ffb760bb938a3 (diff) | |
download | FreeBSD-src-b62e1ca825bfc519be7b8934f4184f9b0fe96e9e.zip FreeBSD-src-b62e1ca825bfc519be7b8934f4184f9b0fe96e9e.tar.gz |
The recomputation of file system summary at mount time can be a
very slow process, especially for large file systems that is just
recovered from a crash.
Since the summary is already re-sync'ed every 30 second, we will
not lag behind too much after a crash. With this consideration
in mind, it is more reasonable to transfer the responsibility to
background fsck, to reduce the delay after a crash.
Add a new sysctl variable, vfs.ffs.compute_summary_at_mount, to
control this behavior. When set to nonzero, we will get the
"old" behavior, that the summary is computed immediately at mount
time.
Add five new sysctl variables to adjust ndir, nbfree, nifree,
nffree and numclusters respectively. Teach fsck_ffs about these
API, however, intentionally not to check the existence, since
kernels without these sysctls must have recomputed the summary
and hence no adjustments are necessary.
This change has eliminated the usual tens of minutes of delay of
mounting large dirty volumes.
Reviewed by: mckusick
MFC After: 1 week
Diffstat (limited to 'sys/ufs/ffs/fs.h')
-rw-r--r-- | sys/ufs/ffs/fs.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/ufs/ffs/fs.h b/sys/ufs/ffs/fs.h index f57669f..572996e 100644 --- a/sys/ufs/ffs/fs.h +++ b/sys/ufs/ffs/fs.h @@ -206,7 +206,12 @@ #define FFS_DIR_FREE 4 /* free specified dir inodes in map */ #define FFS_FILE_FREE 5 /* free specified file inodes in map */ #define FFS_SET_FLAGS 6 /* set filesystem flags */ -#define FFS_MAXID 7 /* number of valid ffs ids */ +#define FFS_ADJ_NDIR 7 /* adjust number of directories */ +#define FFS_ADJ_NBFREE 8 /* adjust number of free blocks */ +#define FFS_ADJ_NIFREE 9 /* adjust number of free inodes */ +#define FFS_ADJ_NFFREE 10 /* adjust number of free frags */ +#define FFS_ADJ_NUMCLUSTERS 11 /* adjust number of free clusters */ +#define FFS_MAXID 12 /* number of valid ffs ids */ /* * Command structure passed in to the filesystem to adjust filesystem values. |