1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

lvmlockd: remove log_error instances for normal conditions

There are a number of log_error instances that are replaced
by log_debug because they are not errors.
This commit is contained in:
David Teigland 2015-07-08 13:23:48 -05:00
parent d77546773b
commit 903569d533

View File

@ -1850,10 +1850,16 @@ static int clear_locks(struct lockspace *ls, int free_vg)
list_for_each_entry_safe(lk, lk_safe, &r->locks, list) { list_for_each_entry_safe(lk, lk_safe, &r->locks, list) {
lk_count++; lk_count++;
/*
* Stopping a lockspace shouldn't happen with LV locks
* still held, but it will be stopped with GL and VG
* locks held.
*/
if (lk->flags & LD_LF_PERSISTENT) if (lk->flags & LD_LF_PERSISTENT)
log_error("S %s R %s clear lock persistent", ls->name, r->name); log_error("S %s R %s clear lock persistent", ls->name, r->name);
else else
log_error("S %s R %s clear lock client %d", ls->name, r->name, lk->client_id); log_debug("S %s R %s clear lock mode %s client %d", ls->name, r->name, mode_str(lk->mode), lk->client_id);
if (lk->version > lk_version) if (lk->version > lk_version)
lk_version = lk->version; lk_version = lk->version;
@ -2356,17 +2362,14 @@ static int vg_ls_name(const char *vg_name, char *ls_name)
/* FIXME: add mutex for gl_lsname_ ? */ /* FIXME: add mutex for gl_lsname_ ? */
static int gl_ls_name(char *ls_name) static void gl_ls_name(char *ls_name)
{ {
if (gl_use_dlm) if (gl_use_dlm)
memcpy(ls_name, gl_lsname_dlm, MAX_NAME); memcpy(ls_name, gl_lsname_dlm, MAX_NAME);
else if (gl_use_sanlock) else if (gl_use_sanlock)
memcpy(ls_name, gl_lsname_sanlock, MAX_NAME); memcpy(ls_name, gl_lsname_sanlock, MAX_NAME);
else { else
log_error("gl_ls_name: global lockspace type unknown"); memset(ls_name, 0, MAX_NAME);
return -1;
}
return 0;
} }
/* /*
@ -3482,7 +3485,8 @@ static int add_lock_action(struct action *act)
int ls_inactive = 0; int ls_inactive = 0;
int ls_create_fail = 0; int ls_create_fail = 0;
ls = find_lockspace_inactive(ls_name); if (ls_name[0])
ls = find_lockspace_inactive(ls_name);
if (ls) { if (ls) {
ls_inactive = 1; ls_inactive = 1;
ls_create_fail = ls->create_fail; ls_create_fail = ls->create_fail;
@ -3496,7 +3500,7 @@ static int add_lock_action(struct action *act)
} else if (act->flags & LD_AF_SEARCH_LS) { } else if (act->flags & LD_AF_SEARCH_LS) {
/* fail if we've already tried searching for the ls */ /* fail if we've already tried searching for the ls */
log_error("lockspace search repeated %s", ls_name); log_debug("lockspace search repeated %s", ls_name);
return -ENOLS; return -ENOLS;
} else if (act->op == LD_OP_LOCK && act->rt == LD_RT_GL && gl_use_sanlock) { } else if (act->op == LD_OP_LOCK && act->rt == LD_RT_GL && gl_use_sanlock) {
@ -3528,7 +3532,7 @@ static int add_lock_action(struct action *act)
return -ENOLS; return -ENOLS;
} else { } else {
log_error("lockspace not found %s", ls_name); log_debug("lockspace not found %s", ls_name);
return -ENOLS; return -ENOLS;
} }
} }