summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_export.c
diff options
context:
space:
mode:
authorbp <bp@FreeBSD.org>2000-07-07 14:01:08 +0000
committerbp <bp@FreeBSD.org>2000-07-07 14:01:08 +0000
commit8a86977869e76ed98bb49dd38a784f62b080ffb7 (patch)
treea51f07132736b16f878f835dd5a63d510ce1dda4 /sys/kern/vfs_export.c
parent30c9e3b784694031bf161baa87b1d79e24a009e3 (diff)
downloadFreeBSD-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.c6
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;
}
OpenPOWER on IntegriCloud