Date: 28 May 1999 07:47:57 -0000 From: Ville-Pertti Keinonen <will@iki.fi> To: zzhang@cs.binghamton.edu Cc: hackers@FreeBSD.ORG Subject: Re: A bug in namei cache? (stale entries) Message-ID: <19990528074757.6921.qmail@ns.oeno.com> In-Reply-To: <Pine.GSO.3.96.990527110156.5144C-100000@sol.cs.binghamton.edu> (message from Zhihui Zhang on Thu, 27 May 1999 11:33:03 -0400 (EDT))
next in thread | previous in thread | raw e-mail | index | archive | help
> Suppose, you have a directory hierarchy a -> b -> c. In each of a, b, and > c, we have the following files: > > a: ., .., a1, a2, a3, b (a1, a2, a3 are not directory files) > b: ., .., b1, b2, b3, c (b1, b2, b3 are not directory files) > > If I do a "mv a a_new", then cache entries for a, a1, a2, a3, b will be > purged from the cache. Although b is purged from the namecache, we can > still find it by other means (e.g. ufs_ihashget() called by ffs_vget()). > So the entries for b1, b2, b3, c are still useful. So the namei cache > will not contain any stale entries. > > Am I right? Yes, except that the "other means" for finding b are more commonly by holding a reference to the vnode (open file handle, currenct directory) or just by searching the directory again. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990528074757.6921.qmail>