[PATCH 4/4] lockd: nfsd4: use same grace period for lockd and nfsd4
Neil Brown
neilb at suse.de
Thu May 3 21:09:11 EDT 2007
On Wednesday May 2, bfields at fieldses.org wrote:
> From: J. Bruce Fields <bfields at fieldses.org>
>
> Both lockd and (in the nfsv4 case) nfsd enforce a "grace period" after
> reboot, during which clients may reclaim locks from the previous server
> instance, but may not acquire new locks.
>
> Currently the lockd and nfsd enforce grace periods of different lengths.
> This may cause problems when we reboot a server with both v2/v3 and v4
> clients. For example, if the lockd grace period is shorter (as is likely
> the case), then a v3 client might acquire a new lock that conflicts with a
> lock already held (but not yet reclaimed) by a v4 client.
>
> This patch calculates a lease time that lockd and nfsd can both use.
This patch also causes nfsd.ko to export get_nfs4_grace_period, which
is used by lockd.ko, so you will have a cyclic dependency between
those two modules - not good.
You could put the get_nfs4_grace_period in nfsd_nlm_ops, or get nfsd
to explicitly tell lockd about grace period changes, but it all feels
rather ugly - the whole grace period concept is rather ugly. I might
write about that in a separate email.
NeilBrown
More information about the NFSv4
mailing list