Re: namei caching of newly created files?
Havard Eidnes <[email protected]> Thu, 20 Jan 2005 19:35:38 +0100 (CET)
| Newsgroups | gmane.os.netbsd.devel.kernel,gmane.os.netbsd.devel.performance |
|---|---|
| Message-ID | <[email protected]> |
> OK, does this look any better? Regrettably, this second try caused pool corruption, and the reason was caught with a DIAGNOSTIC kernel -- cache_enter really only accepts names up to NCHNAMLEN from <sys/namei.h>. Revised patch which appears more stable is: Index: ufs_vnops.c =================================================================== RCS file: /cvsroot/src/sys/ufs/ufs/ufs_vnops.c,v retrieving revision 1.123 diff -u -r1.123 ufs_vnops.c --- ufs_vnops.c 21 Sep 2004 03:10:36 -0000 1.123 +++ ufs_vnops.c 20 Jan 2005 18:30:58 -0000 @@ -2114,6 +2114,8 @@ pool_put(&ufs_direct_pool, newdir); if (error) goto bad; + if (cnp->cn_namelen <= NCHNAMLEN) + cache_enter(dvp, tvp, cnp); if ((cnp->cn_flags & SAVESTART) == 0) PNBUF_PUT(cnp->cn_pnbuf); vput(dvp); Regards, - HÃ¥vard