diff options
author | bp <bp@FreeBSD.org> | 2000-07-07 14:01:08 +0000 |
---|---|---|
committer | bp <bp@FreeBSD.org> | 2000-07-07 14:01:08 +0000 |
commit | 8a86977869e76ed98bb49dd38a784f62b080ffb7 (patch) | |
tree | a51f07132736b16f878f835dd5a63d510ce1dda4 /sys/kern/vfs_export.c | |
parent | 30c9e3b784694031bf161baa87b1d79e24a009e3 (diff) | |
download | FreeBSD-src-8a86977869e76ed98bb49dd38a784f62b080ffb7.zip FreeBSD-src-8a86977869e76ed98bb49dd38a784f62b080ffb7.tar.gz |
Fix support for more than 256 simultaneous mounts. Theoretical limit
is 2^16 mounts per fs type.
Reported by: Troy Arie Cobb <tcobb@staff.circle.net> via phk
Reviewed by: bde
Diffstat (limited to 'sys/kern/vfs_export.c')
-rw-r--r-- | sys/kern/vfs_export.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c index 4e7c3e3..6483660 100644 --- a/sys/kern/vfs_export.c +++ b/sys/kern/vfs_export.c @@ -350,9 +350,11 @@ vfs_getnewfsid(mp) simple_lock(&mntid_slock); mtype = mp->mnt_vfc->vfc_typenum; tfsid.val[1] = mtype; - mtype = (mtype & 0xFF) << 16; + mtype = (mtype & 0xFF) << 24; for (;;) { - tfsid.val[0] = makeudev(255, mtype | mntid_base++); + tfsid.val[0] = makeudev(255, + mtype | ((mntid_base & 0xFF00) << 8) | (mntid_base & 0xFF)); + mntid_base++; if (vfs_getvfs(&tfsid) == NULL) break; } |