Re: [PATCH v3] NFSv4: replace seqcount_t with a rw_semaphore

2016-11-02 Thread Trond Myklebust
> On Nov 2, 2016, at 13:11, Sebastian Andrzej Siewior > wrote: > > On 2016-10-31 16:11:02 [+], Trond Myklebust wrote: >> >> Yes, and yes. We can’t rely on the list pointers remaining correct, so we >> restart the list scan and we use the ops->state_flag_bit to signal whether >> or not st

Re: [PATCH v3] NFSv4: replace seqcount_t with a rw_semaphore

2016-11-02 Thread Sebastian Andrzej Siewior
On 2016-10-31 16:11:02 [+], Trond Myklebust wrote: > > Yes, and yes. We can’t rely on the list pointers remaining correct, so we > restart the list scan and we use the ops->state_flag_bit to signal whether or > not state has been recovered for the entry being scanned. but this is tested at

Re: [PATCH v3] NFSv4: replace seqcount_t with a rw_semaphore

2016-10-31 Thread Trond Myklebust
> On Oct 31, 2016, at 11:56, Sebastian Andrzej Siewior > wrote: > > On 2016-10-31 15:30:02 [+], Trond Myklebust wrote: >>> On Oct 31, 2016, at 09:19, Sebastian Andrzej Siewior >>> wrote: >>> The list_for_each_entry() in nfs4_reclaim_open_state: >>> It seems that this lock protects the ->s

Re: [PATCH v3] NFSv4: replace seqcount_t with a rw_semaphore

2016-10-31 Thread Sebastian Andrzej Siewior
On 2016-10-31 15:30:02 [+], Trond Myklebust wrote: > > On Oct 31, 2016, at 09:19, Sebastian Andrzej Siewior > > wrote: > > The list_for_each_entry() in nfs4_reclaim_open_state: > > It seems that this lock protects the ->so_states list among other > > atomic_t & flags members. So at the begin

Re: [PATCH v3] NFSv4: replace seqcount_t with a rw_semaphore

2016-10-31 Thread Trond Myklebust
> On Oct 31, 2016, at 09:19, Sebastian Andrzej Siewior > wrote: > > The raw_write_seqcount_begin() in nfs4_reclaim_open_state() bugs me > because it maps to preempt_disable() in -RT which I can't have at this > point. So I took a look at the code. > It the lockdep part was removed in commit abb

[PATCH v3] NFSv4: replace seqcount_t with a rw_semaphore

2016-10-31 Thread Sebastian Andrzej Siewior
The raw_write_seqcount_begin() in nfs4_reclaim_open_state() bugs me because it maps to preempt_disable() in -RT which I can't have at this point. So I took a look at the code. It the lockdep part was removed in commit abbec2da13f0 ("NFS: Use raw_write_seqcount_begin/end int nfs4_reclaim_open_state"