summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2005-10-16 21:45:25 +0000
committerkris <kris@FreeBSD.org>2005-10-16 21:45:25 +0000
commitfa8ac582282505203d00979e1f89505ee3e59cc3 (patch)
tree699d26e79e2367e6d85e2b2d679c0e91bfd10eb5 /sys/fs
parent80700e8efc4882936013101e91714d96fab5709a (diff)
downloadFreeBSD-src-fa8ac582282505203d00979e1f89505ee3e59cc3.zip
FreeBSD-src-fa8ac582282505203d00979e1f89505ee3e59cc3.tar.gz
Reflect mpsafety of the underlying filesystem in the nullfs image.
I benchmarked this by simultaneously extracting 4 large tarballs (basically world images) on a 4-processor AMD64 system, in a malloc-backed md. With this patch, system time was reduced by 43%, and wall clock time by 33%. Submitted by: jeff MFC after: 1 week
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/nullfs/null_vfsops.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c
index 38f0f55..2d3ac6e 100644
--- a/sys/fs/nullfs/null_vfsops.c
+++ b/sys/fs/nullfs/null_vfsops.c
@@ -180,6 +180,7 @@ nullfs_mount(struct mount *mp, struct thread *td)
if (NULLVPTOLOWERVP(nullm_rootvp)->v_mount->mnt_flag & MNT_LOCAL)
mp->mnt_flag |= MNT_LOCAL;
+ mp->mnt_kern_flag |= lowerrootvp->v_mount->mnt_kern_flag | MNTK_MPSAFE;
mp->mnt_data = (qaddr_t) xmp;
vfs_getnewfsid(mp);
OpenPOWER on IntegriCloud