[PATCH 2/3] NLM: Proposal for a timeout setting on blocking locks

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

 



# diff -u a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c
--- a/fs/lockd/clntproc.c       Tue Feb 26 01:20:20 2008
+++ b/fs/lockd/clntproc.c       Fri Mar  7 18:08:58 2008
@@ -20,7 +20,6 @@

 #define NLMDBG_FACILITY                NLMDBG_CLIENT
 #define NLMCLNT_GRACE_WAIT     (5*HZ)
-#define NLMCLNT_POLL_TIMEOUT   (30*HZ)
 #define NLMCLNT_MAX_RETRIES    3

 static int     nlmclnt_test(struct nlm_rqst *, struct file_lock *);
@@ -525,7 +524,9 @@
                if (resp->status != nlm_lck_blocked)
                        break;
                /* Wait on an NLM blocking lock */
-               status = nlmclnt_block(block, req, NLMCLNT_POLL_TIMEOUT);
+               if (!nlm_clnt_poll_timeout)
+                       nlm_clnt_poll_timeout = NLMCLNT_POLL_TIMEOUT;
+               status = nlmclnt_block(block, req, nlm_clnt_poll_timeout * HZ);
                /* if we were interrupted. Send a CANCEL request to the server
                 * and exit
                 */
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux