aboutsummaryrefslogtreecommitdiffstats
path: root/tools/blktap2
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-02-12 09:23:10 +0000
committerKeir Fraser <keir.fraser@citrix.com>2010-02-12 09:23:10 +0000
commit70d0560287642c0323f3566d8c998d907c52d7d7 (patch)
tree91aaabf79341949aceb7688a928102c25167ac35 /tools/blktap2
parentd652a9595460cfc81afeb66c17aef7adedfb9175 (diff)
downloadxen-70d0560287642c0323f3566d8c998d907c52d7d7.tar.gz
xen-70d0560287642c0323f3566d8c998d907c52d7d7.tar.bz2
xen-70d0560287642c0323f3566d8c998d907c52d7d7.zip
Remus: increase failover timeout from 500ms to 1s
500ms is aggressive enough to trigger split-brain under fairly ordinary workloads, particularly for HVM. The long-term fix is to integrate with a real HA monitor like linux HA. Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
Diffstat (limited to 'tools/blktap2')
-rw-r--r--tools/blktap2/drivers/block-remus.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/blktap2/drivers/block-remus.c b/tools/blktap2/drivers/block-remus.c
index ca9a814c97..a068878385 100644
--- a/tools/blktap2/drivers/block-remus.c
+++ b/tools/blktap2/drivers/block-remus.c
@@ -59,7 +59,7 @@
#include <unistd.h>
/* timeout for reads and writes in ms */
-#define NET_TIMEOUT 500
+#define HEARTBEAT_MS 1000
#define RAMDISK_HASHSIZE 128
/* connect retry timeout (seconds) */
@@ -604,8 +604,8 @@ static int mread(int fd, void* buf, size_t len)
int rc;
size_t cur = 0;
struct timeval tv = {
- .tv_sec = 0,
- .tv_usec = NET_TIMEOUT * 1000
+ .tv_sec = HEARTBEAT_MS / 1000,
+ .tv_usec = (HEARTBEAT_MS % 1000) * 1000
};
if (!len)
@@ -649,8 +649,8 @@ static int mwrite(int fd, void* buf, size_t len)
size_t cur = 0;
int rc;
struct timeval tv = {
- .tv_sec = 0,
- .tv_usec = NET_TIMEOUT * 1000
+ .tv_sec = HEARTBEAT_MS / 1000,
+ .tv_usec = (HEARTBEAT_MS % 1000) * 1000
};
if (!len)