Justus Winter, le Mon 02 Jun 2014 07:24:59 +0200, a écrit :
> Quoting Samuel Thibault (2014-06-02 03:41:55)
> > Justus Winter, le Sun 01 Jun 2014 22:03:01 +0200, a écrit :
> > > @@ -46,8 +46,18 @@
> > >  #define      INOHASH(ino)    (((unsigned)(ino))%INOHSZ)
> > >  #endif
> > >  
> > > +/* The nodehash is a cache of nodes.
> > > +
> > > +   Access to nodehash and nodehash_nr_items is protected by
> > > +   nodecache_lock.
> > > +
> > > +   Every node in the nodehash carries a light reference.  When we are
> > > +   asked to give up that light reference, we reacquire our lock
> > > +   momentarily to check whether someone else reacquired a reference
> > > +   through the nodehash.  */
> > >  static struct node *nodehash[INOHSZ];
> > >  static size_t nodehash_nr_items;
> > > +static pthread_rwlock_t nodecache_lock = PTHREAD_RWLOCK_INITIALIZER;
> > 
> > Please also document that this is to be taken before
> > diskfs_node_refcnt_lock.
> 
> Actually, the whole point of this excercise is to get rid of
> diskfs_node_refcnt_lock.

Ok :)

But in the meanwhile, please document it :)

Samuel

Reply via email to