]> git.baikalelectronics.ru Git - kernel.git/commit
nfsd: common grace period control
authorJ. Bruce Fields <bfields@citi.umich.edu>
Thu, 6 Sep 2007 16:34:25 +0000 (12:34 -0400)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Fri, 3 Oct 2008 20:19:02 +0000 (16:19 -0400)
commit90de8fd88ede5a10226169b7733adc281c3b9c98
treeeb89187b6c12640a00584bd35be035ba332e4af3
parent291cc7507b830a1bc34ec8e0ea3ad12ba711d020
nfsd: common grace period control

Rewrite grace period code to unify management of grace period across
lockd and nfsd.  The current code has lockd and nfsd cooperate to
compute a grace period which is satisfactory to them both, and then
individually enforce it.  This creates a slight race condition, since
the enforcement is not coordinated.  It's also more complicated than
necessary.

Here instead we have lockd and nfsd each inform common code when they
enter the grace period, and when they're ready to leave the grace
period, and allow normal locking only after both of them are ready to
leave.

We also expect the locks_start_grace()/locks_end_grace() interface here
to be simpler to build on for future cluster/high-availability work,
which may require (for example) putting individual filesystems into
grace, or enforcing grace periods across multiple cluster nodes.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
fs/lockd/Makefile
fs/lockd/grace.c [new file with mode: 0644]
fs/lockd/svc.c
fs/lockd/svc4proc.c
fs/lockd/svcproc.c
fs/nfsd/lockd.c
fs/nfsd/nfs4proc.c
fs/nfsd/nfs4state.c
include/linux/fs.h
include/linux/lockd/bind.h