1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-08-01 00:22:02 +03:00

logging: classify log_debug messages

Place most log_debug() messages into a class.
This commit is contained in:
Alasdair G Kergon
2013-01-07 22:30:29 +00:00
parent 7f747a0d73
commit 06abb2dd4c
47 changed files with 571 additions and 570 deletions

View File

@ -560,8 +560,8 @@ int query_resource(const char *resource, int *mode)
if (decode_lock_type(response[i].response) > *mode)
*mode = decode_lock_type(response[i].response);
log_debug("Lock held for %s, node %s : %s", resource,
response[i].node, response[i].response);
log_debug_locking("Lock held for %s, node %s : %s", resource,
response[i].node, response[i].response);
}
_cluster_free_request(response, num_responses);

View File

@ -48,7 +48,7 @@ static void _undo_flock(const char *file, int fd)
{
struct stat buf1, buf2;
log_debug("_undo_flock %s", file);
log_debug_locking("_undo_flock %s", file);
if (!flock(fd, LOCK_NB | LOCK_EX) &&
!stat(file, &buf1) &&
!fstat(fd, &buf2) &&
@ -137,8 +137,8 @@ static int _do_flock(const char *file, int *fd, int operation, uint32_t nonblock
int old_errno;
struct stat buf1, buf2;
log_debug("_do_flock %s %c%c",
file, operation == LOCK_EX ? 'W' : 'R', nonblock ? ' ' : 'B');
log_debug_locking("_do_flock %s %c%c", file,
operation == LOCK_EX ? 'W' : 'R', nonblock ? ' ' : 'B');
do {
if ((*fd > -1) && close(*fd))
log_sys_error("close", file);

View File

@ -426,7 +426,7 @@ int lock_vol(struct cmd_context *cmd, const char *vol, uint32_t flags)
if (flags == LCK_NONE) {
log_debug(INTERNAL_ERROR "%s: LCK_NONE lock requested", vol);
log_debug_locking(INTERNAL_ERROR "%s: LCK_NONE lock requested", vol);
return 1;
}