Re: [Cluster-devel] [PATCH] gfs2: Add missing rcu locking for glock lookup

2017-02-23 Thread Andrew Price
On 23/02/17 13:08, Bob Peterson wrote: - Original Message - | On 22/02/17 19:19, Bob Peterson wrote: | > - Original Message - | > | From: Andrew Price | > | | > | We must hold the rcu read lock across looking up glocks and trying to | > | bump their refcount to prevent the glocks

Re: [Cluster-devel] [PATCH] gfs2: Add missing rcu locking for glock lookup

2017-02-23 Thread Bob Peterson
- Original Message - | On 22/02/17 19:19, Bob Peterson wrote: | > - Original Message - | > | From: Andrew Price | > | | > | We must hold the rcu read lock across looking up glocks and trying to | > | bump their refcount to prevent the glocks from being freed in between. | > | | > |

Re: [Cluster-devel] [PATCH] gfs2: Add missing rcu locking for glock lookup

2017-02-23 Thread Andrew Price
On 22/02/17 19:19, Bob Peterson wrote: - Original Message - | From: Andrew Price | | We must hold the rcu read lock across looking up glocks and trying to | bump their refcount to prevent the glocks from being freed in between. | | Signed-off-by: Andreas Gruenbacher | --- Hi, Thanks. T

Re: [Cluster-devel] [PATCH] gfs2: Add missing rcu locking for glock lookup

2017-02-22 Thread Bob Peterson
- Original Message - | From: Andrew Price | | We must hold the rcu read lock across looking up glocks and trying to | bump their refcount to prevent the glocks from being freed in between. | | Signed-off-by: Andreas Gruenbacher | --- Hi, Thanks. This is now applied to the for-next bran

Re: [Cluster-devel] [PATCH] gfs2: Add missing rcu locking for glock lookup

2017-02-22 Thread Steven Whitehouse
Hi, On 22/02/17 15:34, Andreas Gruenbacher wrote: On Wed, Feb 22, 2017 at 4:29 PM, Steven Whitehouse wrote: There should be no need to retry at all. Either the new entry will be added to the hash table, or it will find an existing entry in the table. Is there really some way this can fail for

Re: [Cluster-devel] [PATCH] gfs2: Add missing rcu locking for glock lookup

2017-02-22 Thread Andreas Gruenbacher
On Wed, Feb 22, 2017 at 4:29 PM, Steven Whitehouse wrote: > There should be no need to retry at all. Either the new entry will be added > to the hash table, or it will find an existing entry in the table. Is there > really some way this can fail for some reason? Yes, we may find an existing entry

Re: [Cluster-devel] [PATCH] gfs2: Add missing rcu locking for glock lookup

2017-02-22 Thread Steven Whitehouse
Hi, On 22/02/17 15:26, Andreas Gruenbacher wrote: On Wed, Feb 22, 2017 at 4:13 PM, Steven Whitehouse wrote: Hi, Looks good, but can we fix that "retry for 100 times" loop too at the same time? There does appear to be an rhashtable API function that does what we need there, The rhashtable cl

Re: [Cluster-devel] [PATCH] gfs2: Add missing rcu locking for glock lookup

2017-02-22 Thread Andreas Gruenbacher
On Wed, Feb 22, 2017 at 4:26 PM, Andreas Gruenbacher wrote: > On Wed, Feb 22, 2017 at 4:13 PM, Steven Whitehouse > wrote: >> Hi, >> >> Looks good, but can we fix that "retry for 100 times" loop too at the same >> time? There does appear to be an rhashtable API function that does what we >> need

Re: [Cluster-devel] [PATCH] gfs2: Add missing rcu locking for glock lookup

2017-02-22 Thread Andreas Gruenbacher
On Wed, Feb 22, 2017 at 4:13 PM, Steven Whitehouse wrote: > Hi, > > Looks good, but can we fix that "retry for 100 times" loop too at the same > time? There does appear to be an rhashtable API function that does what we > need there, The rhashtable cleanup which I've posted separately doesn't act

Re: [Cluster-devel] [PATCH] gfs2: Add missing rcu locking for glock lookup

2017-02-22 Thread Andrew Price
On 22/02/17 15:09, Andreas Gruenbacher wrote: From: Andrew Price We must hold the rcu read lock across looking up glocks and trying to bump their refcount to prevent the glocks from being freed in between. Signed-off-by: Andreas Gruenbacher Signed-off-by: Andrew Price Thanks, Andy ---

Re: [Cluster-devel] [PATCH] gfs2: Add missing rcu locking for glock lookup

2017-02-22 Thread Steven Whitehouse
Hi, Looks good, but can we fix that "retry for 100 times" loop too at the same time? There does appear to be an rhashtable API function that does what we need there, Steve. On 22/02/17 15:09, Andreas Gruenbacher wrote: From: Andrew Price We must hold the rcu read lock across looking up gl

[Cluster-devel] [PATCH] gfs2: Add missing rcu locking for glock lookup

2017-02-22 Thread Andreas Gruenbacher
From: Andrew Price We must hold the rcu read lock across looking up glocks and trying to bump their refcount to prevent the glocks from being freed in between. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/glock.c | 5 + 1 file changed, 5 insertions(+) diff --git a/fs/gfs2/glock.c b/fs/g