diff options
author | bde <bde@FreeBSD.org> | 1998-01-19 16:55:26 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1998-01-19 16:55:26 +0000 |
commit | f587b268a1db2884ac02d1111626b1def62f83a8 (patch) | |
tree | f6e1da0279bfadc41973589bf8540926d17d31db /sbin | |
parent | ac4b63f1338312c9c6046da53037e2cebd7fd8e4 (diff) | |
download | FreeBSD-src-f587b268a1db2884ac02d1111626b1def62f83a8.zip FreeBSD-src-f587b268a1db2884ac02d1111626b1def62f83a8.tar.gz |
Don't create superblocks with size larger than SBSIZE (8192). The
size was rounded up to a multiple of the fragment size, but this
gave invalid file systems when the fragment size was > SBSIZE (fsck
aborts early on them). Now a fragment size of 32768 seems to work
(too-simple tests with fsck and iozone worked).
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/newfs/mkfs.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c index 6531437..c232256 100644 --- a/sbin/newfs/mkfs.c +++ b/sbin/newfs/mkfs.c @@ -501,6 +501,8 @@ 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_sbsize > SBSIZE) + sblock.fs_sbsize = SBSIZE; if (sblock.fs_ntrak == 1) { sblock.fs_cpc = 0; goto next; @@ -532,6 +534,8 @@ mkfs(pp, fsys, fi, fo) goto next; } sblock.fs_sbsize = fragroundup(&sblock, totalsbsize); + if (sblock.fs_sbsize > SBSIZE) + sblock.fs_sbsize = SBSIZE; /* * calculate the available blocks for each rotational position */ |