> On Mar 29, 2022, at 4:01 PM, Bruce Fields <bfields@xxxxxxxxxxxx> wrote:
>
> On Tue, Mar 29, 2022 at 07:58:46PM +0000, Chuck Lever III wrote:
>> Got it. Agreed, cl_cs_client_state should be reinitialized if
>> a courtesy client is transitioned back to "active".
>>
>> Dai, would you add
>>
>> +enum courtesy_client_state {
>>>>> NFSD4_CLIENT_ACTIVE = 0,
>> + NFSD4_CLIENT_COURTESY,
>> + NFSD4_CLIENT_EXPIRED,
>> + NFSD4_CLIENT_RECONNECTED,
>> +};
>>
>> And set cl_cs_client_state to ACTIVE where the client is
>> allowed to transition back to being active?
>
> I'm not clear then what the RECONNECTED->ACTIVE transition would be.
>
> My feeling is that the RECONNECTED state shouldn't exist, and that there
> should only be a transition of EXPIRED back to ACTIVE.
Audit the places that check for NFSD4_CLIENT_RECONNECTED.
Some of them will expire a reconnected client, some will
let it transition back to active. My impression from Dai
was that the server cannot transition a courtesy client
back to active in _every_ case.
If you can demonstrate that in every case where RECONNECTED
is found that a client should be transitioned to ACTIVE
rather than discarded, then yes, we should get rid of
RECONNECTED in favor of going from COURTESY -> ACTIVE.
--
Chuck Lever