* understanding the need for 2 SETCLIENTIDs on the client
@ 2018-04-19 15:11 Olga Kornievskaia
0 siblings, 0 replies; only message in thread
From: Olga Kornievskaia @ 2018-04-19 15:11 UTC (permalink / raw)
To: linux-nfs
Hi folks,
I'd like to understand the need for doing a double SETCLIENTID by the
client. Initial mount calls nfs4_init_client() which initiates
trunking discovery and calls nfs40_discover_client_trunking() which
ends up sending the SETCLIENTID to the server. However, then on the
first open, the client calls _nfs4_do_open() which calls
nfs4_client_recover_expired_lease() which checks the flags and finds
NFS4CLNT_LEASE_EXPIRED set which triggers another SETCLIENTID.
Client is created in nfs4_alloc_client() with cl_flags having
NFS4CLNT_LEASE_EXPIRED. But why doesn't a successful SETCLIENTID clear
the LEASE_EXPIRED?
If we were to clear the LEASE_EXPIRED flag (which seems like the right
thing after establishing a valid clientid), then open would find a
non-expired state.
Thoughts?
diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c
index 9796314..9ad6110 100644
--- a/fs/nfs/nfs4client.c
+++ b/fs/nfs/nfs4client.c
@@ -581,6 +581,7 @@ int nfs40_walk_client_list(struct nfs_client *new,
nfs4_swap_callback_idents(pos, new);
pos->cl_confirm = new->cl_confirm;
nfs_mark_client_ready(pos, NFS_CS_READY);
+ clear_bit(NFS4CLNT_LEASE_EXPIRED, &pos->cl_state);
prev = NULL;
*result = pos;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-04-19 15:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-19 15:11 understanding the need for 2 SETCLIENTIDs on the client Olga Kornievskaia
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).