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

List:       sanlock-devel
Subject:    3 commits - src/main.c src/resource.c src/sanlock.8 wdmd/main.c
From:       teigland () fedoraproject ! org (David Teigland)
Date:       2012-03-02 21:15:36
Message-ID: 20120302211536.E89EF1921 () lists ! fedorahosted ! org
[Download RAW message or body]

 src/main.c     |    2 +-
 src/resource.c |    8 ++++++--
 src/sanlock.8  |    2 +-
 wdmd/main.c    |    2 +-
 4 files changed, 9 insertions(+), 5 deletions(-)

New commits:
commit 2337dc701058058e588b4aa28ca18cc61c44f267
Author: David Teigland <teigland at redhat.com>
Date:   Fri Mar 2 15:13:24 2012 -0600

    release 2.0
    
    Signed-off-by: David Teigland <teigland at redhat.com>

diff --git a/src/main.c b/src/main.c
index 290f65d..af82320 100644
--- a/src/main.c
+++ b/src/main.c
@@ -50,7 +50,7 @@
 #include "client_cmd.h"
 #include "cmd.h"
 
-#define RELEASE_VERSION "1.9"
+#define RELEASE_VERSION "2.0"
 
 struct thread_pool {
 	int num_workers;
diff --git a/wdmd/main.c b/wdmd/main.c
index 6a3815e..1bd517a 100644
--- a/wdmd/main.c
+++ b/wdmd/main.c
@@ -41,7 +41,7 @@
 #define GNUC_UNUSED __attribute__((__unused__))
 #endif
 
-#define RELEASE_VERSION "1.9"
+#define RELEASE_VERSION "2.0"
 
 #define DEFAULT_TEST_INTERVAL 10
 #define DEFAULT_FIRE_TIMEOUT 60


commit f8dc878ba2d813969c7565f489be8255414f5b30
Author: David Teigland <teigland at redhat.com>
Date:   Fri Mar 2 15:10:20 2012 -0600

    sanlock man page: mention SH
    
    Signed-off-by: David Teigland <teigland at redhat.com>

diff --git a/src/sanlock.8 b/src/sanlock.8
index fd8accb..5a2fb7c 100644
--- a/src/sanlock.8
+++ b/src/sanlock.8
@@ -431,7 +431,7 @@ RESOURCE option string with version
 
 .BR \-r " " \fIlockspace_name\fP:\fIresource_name\fP:\fIpath\fP:\fIoffset\fP:\fIlver\fP
 .P
-.IR lver " leader version"
+.IR lver " leader version or SH for shared lease"
 
 .SS Defaults
 


commit 6214f2e1b4e3ab0d9c33ac9fe4d8c3160f309711
Author: David Teigland <teigland at redhat.com>
Date:   Fri Mar 2 15:07:12 2012 -0600

    sanlock: set sector_size in shared tokens
    
    New tokens on existing shared resources need to
    have sector_size set in the disk since they aren't
    opened.  release will expect the sector_size to be set.
    
    Signed-off-by: David Teigland <teigland at redhat.com>

diff --git a/src/resource.c b/src/resource.c
index 7032e6d..ba2dcb6 100644
--- a/src/resource.c
+++ b/src/resource.c
@@ -147,6 +147,8 @@ static int set_mode_block(struct task *task, struct token *token,
 	disk = &token->disks[0];
 
 	iobuf_len = disk->sector_size;
+	if (!iobuf_len)
+		return -EINVAL;
 
 	p_iobuf = &iobuf;
 
@@ -199,6 +201,8 @@ static int read_mode_block(struct task *task, struct token *token,
 	disk = &token->disks[0];
 
 	iobuf_len = disk->sector_size;
+	if (!iobuf_len)
+		return -EINVAL;
 
 	p_iobuf = &iobuf;
 
@@ -323,8 +327,7 @@ static int release_disk(struct task *task, struct token *token,
 	return rv; /* SANLK_OK */
 }
 
-static int _release_token(struct task *task, struct token *token, int opened,
-			  int nodisk)
+static int _release_token(struct task *task, struct token *token, int opened, int nodisk)
 {
 	struct resource *r = token->resource;
 	uint64_t lver;
@@ -550,6 +553,7 @@ int acquire_token(struct task *task, struct token *token)
 	if (r && (token->acquire_flags & SANLK_RES_SHARED) && (r->flags & R_SHARED)) {
 		/* multiple shared holders allowed */
 		log_token(token, "acquire_token add shared");
+		copy_disks(&token->r.disks, &r->r.disks, token->r.num_disks);
 		token->resource = r;
 		list_add(&token->list, &r->tokens);
 		pthread_mutex_unlock(&resource_mutex);



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

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