diff options
author | iedowse <iedowse@FreeBSD.org> | 2001-09-09 23:48:28 +0000 |
---|---|---|
committer | iedowse <iedowse@FreeBSD.org> | 2001-09-09 23:48:28 +0000 |
commit | ddaced1703546f87091111490e8f2546d9459465 (patch) | |
tree | 281c33ce8a0a8f87034b76d4c64b7ce42065e8af /sys/ufs/ffs/ffs_vfsops.c | |
parent | cfad1534f835ef2efb2b12d5e34034b85456e19a (diff) | |
download | FreeBSD-src-ddaced1703546f87091111490e8f2546d9459465.zip FreeBSD-src-ddaced1703546f87091111490e8f2546d9459465.tar.gz |
The "dirpref" directory layout preference improvements make use of
an array "fs_contigdirs[]" to avoid too many directories getting
created in each cylinder group. The memory required for this and
two other arrays (fs_csp[] and fs_maxcluster[]) is allocated with
a single malloc() call, and divided up afterwards. However, the
'space' pointer is not advanced correctly, so fs_contigdirs and
fs_maxcluster end up pointing to the same address.
Add the missing code to advance the 'space' pointer, and remove
an unnecessary update of the pointer that follows.
This is likely to fix the "ffs_clusteralloc: map mismatch" panics
that have been reported recently.
Submitted by: Luke Mewburn <lukem@wasabisystems.com>
Diffstat (limited to 'sys/ufs/ffs/ffs_vfsops.c')
-rw-r--r-- | sys/ufs/ffs/ffs_vfsops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index c9607e5..f741036 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -684,10 +684,10 @@ ffs_mountfs(devvp, mp, p, malloctype) fs->fs_maxcluster = lp = space; for (i = 0; i < fs->fs_ncg; i++) *lp++ = fs->fs_contigsumsize; + space = lp; } size = fs->fs_ncg * sizeof(u_int8_t); fs->fs_contigdirs = (u_int8_t *)space; - space = (u_int8_t *)space + size; bzero(fs->fs_contigdirs, size); /* Compatibility for old filesystems XXX */ if (fs->fs_avgfilesize <= 0) /* XXX */ |