src/main.c | 3 ++- src/resource.c | 6 +++--- src/sanlock_internal.h | 1 + 3 files changed, 6 insertions(+), 4 deletions(-)
New commits: commit e883b4c68f8ee52c15b09dbb84b2a60d6b3fcc8e Author: David Teigland teigland@redhat.com Date: Tue Jan 5 09:58:34 2016 -0600
sanlock: change quiet_fail default to 1
Reduce the severity of logging when lock conflicts occur.
diff --git a/src/main.c b/src/main.c index c1d7e93..25d0819 100644 --- a/src/main.c +++ b/src/main.c @@ -1805,7 +1805,7 @@ static void print_usage(void) printf("\n"); printf("sanlock daemon [options]\n"); printf(" -D no fork and print all logging to stderr\n"); - printf(" -Q 0|1 quiet error messages for common lock contention (0)\n"); + printf(" -Q 0|1 quiet error messages for common lock contention (%d)\n", DEFAULT_QUIET_FAIL); printf(" -R 0|1 renewal debugging, log debug info about renewals (0)\n"); printf(" -L <pri> write logging at priority level and up to logfile (3 LOG_ERR)\n"); printf(" (use -1 for none)\n"); @@ -3180,6 +3180,7 @@ int main(int argc, char *argv[]) com.aio_arg = DEFAULT_USE_AIO; com.pid = -1; com.sh_retries = DEFAULT_SH_RETRIES; + com.quiet_fail = DEFAULT_QUIET_FAIL;
if (getgrnam("sanlock") && getpwnam("sanlock")) { com.uname = (char *)"sanlock"; diff --git a/src/sanlock_internal.h b/src/sanlock_internal.h index 0855eec..9a276d1 100644 --- a/src/sanlock_internal.h +++ b/src/sanlock_internal.h @@ -281,6 +281,7 @@ EXTERN struct client *client; #define DEFAULT_MIN_WORKER_THREADS 2 #define DEFAULT_MAX_WORKER_THREADS 8 #define DEFAULT_SH_RETRIES 8 +#define DEFAULT_QUIET_FAIL 1
struct command_line { int type; /* COM_ */
commit a1a7a1f5905849bf2eff177dc64ef59f5dc1176f Author: David Teigland teigland@redhat.com Date: Tue Jan 5 10:06:09 2016 -0600
sanlock: fix syntax errors
in commit d6bef45b9716c581d99466280a52a01c9ebe3bf7
diff --git a/src/resource.c b/src/resource.c index 55472d9..91a18e9 100644 --- a/src/resource.c +++ b/src/resource.c @@ -782,7 +782,7 @@ static int _release_token(struct task *task, struct token *token, } }
- log_token(token, "release_token r_flags %x lver %llu, + log_token(token, "release_token r_flags %x lver %llu", r_flags, (unsigned long long)lver);
/* @@ -899,7 +899,7 @@ static int _release_token(struct task *task, struct token *token, if (ret != SANLK_OK) log_token(token, "release_token error %d r_flags %x", ret, r_flags); else - log_token(token, "release_token done r_flags %x", ret, r_flags); + log_token(token, "release_token done r_flags %x", r_flags); pthread_mutex_lock(&resource_mutex); list_del(&r->list); pthread_mutex_unlock(&resource_mutex); @@ -1982,7 +1982,7 @@ static void resource_thread_release(struct task *task, struct resource *r, struc * FIXME: avoid duplicating all this from _release_token. */
- log_token(token, "release async r_flags %x, r_flags); + log_token(token, "release async r_flags %x", r_flags);
if (r_flags & R_ERASE_ALL) { rv = write_host_block(task, token, token->host_id, 0, 0);
sanlock-devel@lists.fedorahosted.org