From 4a41a93a7ac623b63cd62ffb27bf48fd65d255a5 Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Fri, 14 Dec 2007 17:26:09 +0000 Subject: [PATCH] Add node operation stack debug messages. --- WHATS_NEW_DM | 1 + libdm/libdm-common.c | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM index 3dba02d97..409137560 100644 --- a/WHATS_NEW_DM +++ b/WHATS_NEW_DM @@ -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. diff --git a/libdm/libdm-common.c b/libdm/libdm-common.c index 4ce2ced22..36dada496 100644 --- a/libdm/libdm-common.c +++ b/libdm/libdm-common.c @@ -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); }