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).
This commit is contained in:
Bruce Evans 1998-01-19 16:55:26 +00:00
parent cc52d04f9f
commit 90e05a748a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=32623

View File

@ -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
*/