projects
/
dragonfly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
b519f37
)
VFS accounting: do not set vp->v_pfsmp for non-nullfs mounts
author
Francois Tigeot <ftigeot@wolfpond.org>
Sun, 25 Mar 2012 08:27:07 +0000 (10:27 +0200)
committer
François Tigeot <ftigeot@wolfpond.org>
Sun, 25 Mar 2012 09:08:02 +0000 (11:08 +0200)
* the test in _cache_setvp() was wrong and was initializing a pfs-specific
accounting variable in vnodes for all filesystem types, possibly causing
unnecessary work for each filesystem write operation.
sys/kern/vfs_cache.c
patch
|
blob
|
blame
|
history
diff --git
a/sys/kern/vfs_cache.c
b/sys/kern/vfs_cache.c
index
62b8469
..
19031fc
100644
(file)
--- a/
sys/kern/vfs_cache.c
+++ b/
sys/kern/vfs_cache.c
@@
-904,7
+904,8
@@
_cache_setvp(struct mount *mp, struct namecache *ncp, struct vnode *vp)
/* XXX: this is a hack to work-around the lack of a real pfs vfs
* implementation*/
if (mp != NULL)
- vp->v_pfsmp = mp;
+ if (strncmp(mp->mnt_stat.f_fstypename, "null", 5) == 0)
+ vp->v_pfsmp = mp;
} else {
/*
* When creating a negative cache hit we set the