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

Add node operation stack debug messages.

This commit is contained in:
Alasdair Kergon 2007-12-14 17:26:09 +00:00
parent 3a2234162d
commit 4a41a93a7a
2 changed files with 11 additions and 0 deletions

View File

@ -1,5 +1,6 @@
Version 1.02.24 -
===================================
Add node operation stack debug messages.
Report error when empty device name passed to readahead functions.
Fix minimum readahead debug message.

View File

@ -575,18 +575,25 @@ static void _pop_node_ops(void)
int add_dev_node(const char *dev_name, uint32_t major, uint32_t minor,
uid_t uid, gid_t gid, mode_t mode)
{
log_debug("%s: Stacking NODE_ADD (%" PRIu32 ",%" PRIu32 ") %u:%u 0%o",
dev_name, major, minor, uid, gid, mode);
return _stack_node_op(NODE_ADD, dev_name, major, minor, uid, gid, mode,
"", 0, 0);
}
int rename_dev_node(const char *old_name, const char *new_name)
{
log_debug("%s: Stacking NODE_RENAME to %s", old_name, new_name);
return _stack_node_op(NODE_RENAME, new_name, 0, 0, 0, 0, 0, old_name,
0, 0);
}
int rm_dev_node(const char *dev_name)
{
log_debug("%s: Stacking NODE_DEL", dev_name);
return _stack_node_op(NODE_DEL, dev_name, 0, 0, 0, 0, 0, "", 0, 0);
}
@ -596,6 +603,9 @@ int set_dev_node_read_ahead(const char *dev_name, uint32_t read_ahead,
if (read_ahead == DM_READ_AHEAD_AUTO)
return 1;
log_debug("%s: Stacking NODE_READ_AHEAD %" PRIu32 " (flags=%" PRIu32
")", dev_name, read_ahead, read_ahead_flags);
return _stack_node_op(NODE_READ_AHEAD, dev_name, 0, 0, 0, 0, 0, "",
read_ahead, read_ahead_flags);
}