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:
parent
cc52d04f9f
commit
90e05a748a
@ -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
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user