[PATCH 1/8] lockd: nfsd4: use same grace period for lockd and nfsd4
J. Bruce Fields
bfields at fieldses.org
Wed Jun 20 16:27:56 EDT 2007
On Tue, Jun 19, 2007 at 08:37:29PM -0400, Trond Myklebust wrote:
> On Tue, 2007-06-19 at 15:28 -0400, J. Bruce Fields wrote:
> > diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
> > index 126b1bf..6378572 100644
> > --- a/fs/lockd/svc.c
> > +++ b/fs/lockd/svc.c
> > @@ -75,18 +75,35 @@ static const int nlm_port_min = 0, nlm_port_max = 65535;
> >
> > static struct ctl_table_header * nlm_sysctl_table;
> >
> > -static unsigned long set_grace_period(void)
> > +static time_t get_lockd_grace_period(void)
> > {
> > - unsigned long grace_period;
> > -
> > /* Note: nlm_timeout should always be nonzero */
> > if (nlm_grace_period)
> > - grace_period = ((nlm_grace_period + nlm_timeout - 1)
> > - / nlm_timeout) * nlm_timeout * HZ;
> > + return ((nlm_grace_period + nlm_timeout - 1)
> > + / nlm_timeout) * nlm_timeout;
> > else
> > - grace_period = nlm_timeout * 5 * HZ;
> > + return nlm_timeout * 5;
> > +}
>
> Why on earth are you changing the units here?
There were basically two callers, one using seconds, one jiffies, so we
picked one.
> The natural unit inside the kernel is the jiffy, not the second.
OK. How about this?
--b.
More information about the NFSv4
mailing list