Subject: Re: vfs namecache change
To: Antti Kantee <pooka@cs.hut.fi>
From: Elad Efrat <elad@NetBSD.org>
List: tech-kern
Date: 12/29/2006 21:15:47
this might be fixing pr/35276.
-e.
Antti Kantee wrote:
> Hi,
>
> Seems like the vfs name cache was accidentally(?) changed to not cache
> anything else than CREATE operations for leaf components. The patch
> restores old behaviour back, AFAICT. Of course I maybe don't agree with
> saying what we want to say with the way we are saying it (house of cards,
> anyone?), but a major rototillation will have to wait for another time.
>
> look ok?
>
> Index: vfs_lookup.c
> ===================================================================
> RCS file: /cvsroot/src/sys/kern/vfs_lookup.c,v
> retrieving revision 1.77
> diff -u -r1.77 vfs_lookup.c
> --- vfs_lookup.c 27 Dec 2006 23:21:02 -0000 1.77
> +++ vfs_lookup.c 29 Dec 2006 19:02:46 -0000
> @@ -527,7 +527,7 @@
> * Setup: break out flag bits into variables.
> */
> docache = (cnp->cn_flags & NOCACHE) ^ NOCACHE;
> - if (cnp->cn_nameiop != CREATE)
> + if ((cnp->cn_flags & LOCKPARENT) && (cnp->cn_nameiop != CREATE))
> docache = 0;
> rdonly = cnp->cn_flags & RDONLY;
> ndp->ni_dvp = NULL;
>