]> git.baikalelectronics.ru Git - kernel.git/commit
nfsd: allow forced expiration of NFSv4 clients
authorJ. Bruce Fields <bfields@redhat.com>
Wed, 19 Jun 2019 16:43:11 +0000 (12:43 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Wed, 3 Jul 2019 21:52:50 +0000 (17:52 -0400)
commit61a1c407bda298562f895bea44cc75222038bd3e
treee335b0c13b5527adcf17459bde3d0fd36aa3d68e
parent5ad007e83afbca19457f6cb74b297558f6db8d8f
nfsd: allow forced expiration of NFSv4 clients

NFSv4 clients are automatically expired and all their locks removed if
they don't contact the server for a certain amount of time (the lease
period, 90 seconds by default).

There can still be situations where that's not enough, so allow
userspace to force expiry by writing "expire\n" to the new
nfsd/client/#/ctl file.

(The generic "ctl" name is because I expect we may want to allow other
operations on clients in the future.)

The write will not return until the client is expired and all of its
locks and other state removed.

The fault injection code also provides a way of expiring clients, but it
fails if there are any in-progress RPC's referencing the client.  Also,
its method of selecting a client to expire is a little more
primitive--it uses an IP address, which can't always uniquely specify an
NFSv4 client.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4state.c