src/main.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
New commits:
commit d05aac412b50baee23d2a0847e1676040d2efbff
Author: David Teigland <teigland(a)redhat.com>
Date: Thu Oct 4 16:47:58 2012 -0500
sanlock: client add_lockspace with timeout
When a -o io timeout value not equal to the
default (10) is used, the command will use
the add_lockspace_timeout api.
Signed-off-by: David Teigland <teigland(a)redhat.com>
diff --git a/src/main.c b/src/main.c
index a0b5145..33f90a7 100644
--- a/src/main.c
+++ b/src/main.c
@@ -2177,9 +2177,16 @@ static int do_client(void)
break;
case ACT_ADD_LOCKSPACE:
- log_tool("add_lockspace");
- rv = sanlock_add_lockspace(&com.lockspace, 0);
- log_tool("add_lockspace done %d", rv);
+ if (com.io_timeout_arg != DEFAULT_IO_TIMEOUT) {
+ log_tool("add_lockspace_timeout %d", com.io_timeout_arg);
+ rv = sanlock_add_lockspace_timeout(&com.lockspace, 0,
+ com.io_timeout_arg);
+ log_tool("add_lockspace_timeout done %d", rv);
+ } else {
+ log_tool("add_lockspace");
+ rv = sanlock_add_lockspace(&com.lockspace, 0);
+ log_tool("add_lockspace done %d", rv);
+ }
break;
case ACT_INQ_LOCKSPACE:
Show replies by date