DragonFly BSD
DragonFly kernel List (threaded) for 2004-11
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: cache_inval

To: dillon@xxxxxxxxxxxxxxxxxxxx
From: Richard Nyberg <rnyberg@xxxxxxxx>
Date: Wed, 17 Nov 2004 16:44:44 +0100

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.


[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]