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

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

 



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());
}

-- 
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

[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