Commit e9488d5a authored by Dai Ngo's avatar Dai Ngo Committed by Chuck Lever

NFSD: Show state of courtesy client in client info

Update client_info_show to show state of courtesy client
and seconds since last renew.
Reviewed-by: default avatarJ. Bruce Fields <bfields@fieldses.org>
Signed-off-by: default avatarDai Ngo <dai.ngo@oracle.com>
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
parent 27431aff
......@@ -2481,10 +2481,17 @@ static int client_info_show(struct seq_file *m, void *v)
memcpy(&clid, &clp->cl_clientid, sizeof(clid));
seq_printf(m, "clientid: 0x%llx\n", clid);
seq_printf(m, "address: \"%pISpc\"\n", (struct sockaddr *)&clp->cl_addr);
if (test_bit(NFSD4_CLIENT_CONFIRMED, &clp->cl_flags))
if (clp->cl_state == NFSD4_COURTESY)
seq_puts(m, "status: courtesy\n");
else if (clp->cl_state == NFSD4_EXPIRABLE)
seq_puts(m, "status: expirable\n");
else if (test_bit(NFSD4_CLIENT_CONFIRMED, &clp->cl_flags))
seq_puts(m, "status: confirmed\n");
else
seq_puts(m, "status: unconfirmed\n");
seq_printf(m, "seconds from last renew: %lld\n",
ktime_get_boottime_seconds() - clp->cl_time);
seq_printf(m, "name: ");
seq_quote_mem(m, clp->cl_name.data, clp->cl_name.len);
seq_printf(m, "\nminor version: %d\n", clp->cl_minorversion);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment