cache_inval

Richard Nyberg rnyberg at it.su.se
Wed Nov 17 07:44:44 PST 2004


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






More information about the Kernel mailing list