Re: starting 90-second grace period : leasetime less than 10

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 14, 2009 at 05:40:20PM +0530, Tharindu Rukshan Bamunuarachchi wrote:
> I can not set nfs4leasetime value less than 10 seconds.
> 
> there is a verification in __write_leasetime(). (lease < 10 || lease > 3600)
> 
> I am going to change this to ~2 second (to make NFS HA failover happen
> in less than 10 seconds with HeartBeat).
> 
> Any reason why is this checked for 10 (i.e. lease < 10) ... ?

No reason for that particular limit, but this does mean every client
will have to send a small NFSv4 operation to the server at least once
every 2 seconds as long as it holds any opens or other state. And if the
network goes down for more than 2 seonds the client will probably lose
that state.

Is it the grace-period time on the takeover server that you're trying to
limit?

--b.

> 
> 
> 
> 
> 
> static ssize_t __write_leasetime(struct file *file, char *buf, size_t size)
> {
>         /* if size > 10 seconds, call
>          * nfs4_reset_lease() then write out the new lease (seconds) as reply
>          */
>         char *mesg = buf;
>         int rv, lease;
> 
>         if (size > 0) {
>                 if (nfsd_serv)
>                         return -EBUSY;
>                 rv = get_int(&mesg, &lease);
>                 if (rv)
>                         return rv;
>                 if (lease < 10 || lease > 3600)
>                         return -EINVAL;
>                 nfs4_reset_lease(lease);
>         }
> 
>         return scnprintf(buf, SIMPLE_TRANSACTION_LIMIT, "%ld\n",
>                                                         nfs4_lease_time());
> }
> 
> -- 
> Tharindu Rukshan Bamunuarachchi
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux