FIx performance regression from rmind@:
Just from a very quick look, it seems like a regression introduced with the vcache changes: the MP-safe flag is set too late and not inherited by the root vnode.
This commit is contained in:
parent
d06e49026c
commit
ef24a84407
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: tmpfs_vfsops.c,v 1.72 2017/06/01 02:45:13 chs Exp $ */
|
||||
/* $NetBSD: tmpfs_vfsops.c,v 1.73 2018/08/09 08:43:56 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc.
|
||||
@ -42,7 +42,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: tmpfs_vfsops.c,v 1.72 2017/06/01 02:45:13 chs Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: tmpfs_vfsops.c,v 1.73 2018/08/09 08:43:56 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/atomic.h>
|
||||
@ -182,6 +182,13 @@ tmpfs_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
|
||||
return 0;
|
||||
}
|
||||
|
||||
mp->mnt_flag |= MNT_LOCAL;
|
||||
mp->mnt_stat.f_namemax = TMPFS_MAXNAMLEN;
|
||||
mp->mnt_fs_bshift = PAGE_SHIFT;
|
||||
mp->mnt_dev_bshift = DEV_BSHIFT;
|
||||
mp->mnt_iflag |= IMNT_MPSAFE | IMNT_CAN_RWTORO;
|
||||
vfs_getnewfsid(mp);
|
||||
|
||||
/* Allocate the tmpfs mount structure and fill it. */
|
||||
tmp = kmem_zalloc(sizeof(tmpfs_mount_t), KM_SLEEP);
|
||||
tmp->tm_nodes_max = nodes;
|
||||
@ -220,13 +227,6 @@ tmpfs_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
|
||||
tmp->tm_root = root;
|
||||
vrele(vp);
|
||||
|
||||
mp->mnt_flag |= MNT_LOCAL;
|
||||
mp->mnt_stat.f_namemax = TMPFS_MAXNAMLEN;
|
||||
mp->mnt_fs_bshift = PAGE_SHIFT;
|
||||
mp->mnt_dev_bshift = DEV_BSHIFT;
|
||||
mp->mnt_iflag |= IMNT_MPSAFE | IMNT_CAN_RWTORO;
|
||||
vfs_getnewfsid(mp);
|
||||
|
||||
error = set_statvfs_info(path, UIO_USERSPACE, "tmpfs", UIO_SYSSPACE,
|
||||
mp->mnt_op->vfs_name, mp, curlwp);
|
||||
if (error) {
|
||||
|
Loading…
Reference in New Issue
Block a user