[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sanlock-devel
Subject:    Branch 'work3' - src/main.c
From:       teigland () fedoraproject ! org (David Teigland)
Date:       2012-10-04 21:49:09
Message-ID: 20121004214909.AA44E2E58 () hosted02 ! fedoraproject ! org
[Download RAW message or body]

 src/main.c |   13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

New commits:
commit d05aac412b50baee23d2a0847e1676040d2efbff
Author: David Teigland <teigland at 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 at 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:



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic