]> git.baikalelectronics.ru Git - kernel.git/commit
nfsd: pass extra info in env vars to upcalls to allow for early grace period end
authorJeff Layton <jlayton@primarydata.com>
Fri, 12 Sep 2014 20:40:21 +0000 (16:40 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Wed, 17 Sep 2014 20:33:15 +0000 (16:33 -0400)
commitc86568694b14e4165cc995ea6d8116142dea35b6
tree421a5776f63b395dec5d16b5dbbb0217b03dff54
parent9072ac34b9243917c097df9f3be3aa23b1174a7e
nfsd: pass extra info in env vars to upcalls to allow for early grace period end

In order to support lifting the grace period early, we must tell
nfsdcltrack what sort of client the "create" upcall is for. We can't
reliably tell if a v4.0 client has completed reclaiming, so we can only
lift the grace period once all the v4.1+ clients have issued a
RECLAIM_COMPLETE and if there are no v4.0 clients.

Also, in order to lift the grace period, we have to tell userland when
the grace period started so that it can tell whether a RECLAIM_COMPLETE
has been issued for each client since then.

Since this is all optional info, we pass it along in environment
variables to the "init" and "create" upcalls. By doing this, we don't
need to revise the upcall format. The UMH upcall can simply make use of
this info if it happens to be present. If it's not then it can just
avoid lifting the grace period early.

Signed-off-by: Jeff Layton <jlayton@primarydata.com>
fs/nfsd/nfs4recover.c
fs/nfsd/nfs4state.c