Re: cache_inval

看板DFBSD_kernel作者時間21年前 (2004/11/18 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串3/3 (看更多)
At Tue, 16 Nov 2004 17:45:26 -0800 (PST), Matthew Dillon wrote: > > Ok Richard, here is a patch I've worked up to fix cache_inval(). It > now no longer disconnects the namecache records from the topology, it > simply sets them to an unresolved state (recursively if CINV_CHILDREN is > specified). CINV_DESTROY tells it to invalidate the name of the > passed ncp so cache_nlookup() no longer see it. CINV_DESTROY is not > recursive. > > cache_inval() now does CINV_SELF automatically (that is, sets the passed > ncp to an unresolved state), and the flag has been removed. > > cache_inval(..., CINV_SELF, CINV_CHILDREN) should now do what you need > it to do. Note that the ncp you pass into cache_inval() MUST be locked, > and will remain locked on return. > > Also, it turns out that I misspoke in my last posting... the recursion is > *NOT* mandatory because the parent link is left intact. It was only > mandatory when the parent is unlinked (which no longer occurs anywhere). > > Anyone else who would like to try this patch, it does need testing > before I commit it. I don't expect any serious problems but there's > always the chance of hitting a deadlock situation when the locks are > messed around with, and I definitely mess around with the locks here. Ok, great! It's running on one of my machines without problems so far. I've only done very light testing yet though. -Richard
文章代碼(AID): #11cv7v00 (DFBSD_kernel)
文章代碼(AID): #11cv7v00 (DFBSD_kernel)