starting 90-second grace period : leasetime less than 10
Subsystems (2)
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) ... ?
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());
}Signature · 1 line
Tharindu Rukshan Bamunuarachchi
A message that is not in the archive (sent off-list or not yet received): f5b5ebae0912140410t2814d7bck688549103b3104ea-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 8 lines · Tharindu Rukshan Bamunuarachchi
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.
Quoted 34 lines
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()); }Signature · 5 lines
Tharindu Rukshan Bamunuarachchi -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html