Date: Sun, 26 Jun 2011 09:57:46 GMT From: Ilya Putsikau <ilya@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 195358 for review Message-ID: <201106260957.p5Q9vkbn012746@skunkworks.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@195358?ac=10 Change 195358 by ilya@ilya_triton2011 on 2011/06/26 09:56:46 Add lookup_cache_enable sysctl Check dvp != NULL before calling cache_enter Affected files ... .. //depot/projects/soc2011/ilya_fuse/fuse_module/fuse_node.c#11 edit .. //depot/projects/soc2011/ilya_fuse/fuse_module/fuse_vnops.c#30 edit Differences ... ==== //depot/projects/soc2011/ilya_fuse/fuse_module/fuse_node.c#11 (text+ko) ==== @@ -187,7 +187,9 @@ MPASS(!(cnp->cn_namelen == 1 && cnp->cn_nameptr[0] == '.')); VTOFUD(*vpp)->parent_nid = VTOI(dvp); } - if (cnp != NULL && (cnp->cn_flags & MAKEENTRY) != 0) { + if (dvp != NULL && cnp != NULL && (cnp->cn_flags & MAKEENTRY) != 0) { + ASSERT_VOP_LOCKED(*vpp, "fuse_vnode_get"); + ASSERT_VOP_LOCKED(dvp, "fuse_vnode_get"); cache_enter(dvp, *vpp, cnp); } VTOFUD(*vpp)->nlookup++; ==== //depot/projects/soc2011/ilya_fuse/fuse_module/fuse_vnops.c#30 (text+ko) ==== @@ -122,6 +122,10 @@ SYSCTL_ULONG(_vfs_fuse, OID_AUTO, lookup_cache_misses, CTLFLAG_RD, &fuse_lookup_cache_misses, 0, ""); +int fuse_lookup_cache_enable = 1; +SYSCTL_INT(_vfs_fuse, OID_AUTO, lookup_cache_enable, CTLFLAG_RW, + &fuse_lookup_cache_enable, 0, ""); + int fuse_pbuf_freecnt = -1; /* @@ -695,7 +699,7 @@ fdisp_init(&fdi, 0); op = FUSE_GETATTR; goto calldaemon; - } else { + } else if (fuse_lookup_cache_enable) { err = cache_lookup(dvp, vpp, cnp); switch (err) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106260957.p5Q9vkbn012746>