Re: [PATCH 3/6] ext2fs: use a seperate lock to protect nodehash

2014-06-02 Thread Samuel Thibault
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 nod

Re: [PATCH 3/6] ext2fs: use a seperate lock to protect nodehash

2014-06-01 Thread Justus Winter
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_n

Re: [PATCH 3/6] ext2fs: use a seperate lock to protect nodehash

2014-06-01 Thread Samuel Thibault
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

[PATCH 3/6] ext2fs: use a seperate lock to protect nodehash

2014-06-01 Thread Justus Winter
Previously, ext2fs used diskfs_node_refcnt_lock to serialize access to the nodehash. Use a separate lock to protect nodehash. Adjust the reference counting accordingly. Every node in the nodehash carries a light reference. When we are asked to give up that light reference, we reacquire our lock