Skip to contentSkip to conversation

nilfs2: introduce nilfs2_debug() method

PATCH In review Vyacheslav Dubeyko 1 participant 1 message Jun 17, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/24 nilfs2: introduce nilfs2_debug() method

From: Vyacheslav Dubeyko <[email protected]>
Subject: [PATCH 01/24] nilfs2: introduce nilfs2_debug() method

This patch adds basis for debugging subsystem in NILFS2. It introduces kernel configuration option CONFIG_NILFS2_DEBUG that enables debugging opportunity for NILFS2. This configuration option is depended from CONFIG_NILFS2_FS.

The nilfs2_debug() method is a basic method for debugging output. It receives a set of flags, format string and variable arguments list. The debug subsystem has DBG_MASK variable. It defines flags of subsystems and options that can be printed. The nilfs2_debug() method compares DBG_MASK with flags during a call. If requested flags are valid for output then debugging output takes place.

---
 fs/nilfs2/Kconfig |   13 +++++++++++++
 fs/nilfs2/debug.h |   56 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 69 insertions(+)
 create mode 100644 fs/nilfs2/debug.h
fs/nilfs2/Kconfig +13 -0
index 80da8eb..a379d8e 100644
@@ -22,3 +22,16 @@ config NILFS2_FS
 
 	  To compile this file system support as a module, choose M here: the
 	  module will be called nilfs2.  If unsure, say N.
+
+if NILFS2_FS
+
+config NILFS2_DEBUG
+	bool "NILFS2 debugging"
+	default n
+	help
+	  If you are experiencing any problems with the NILFS2 filesystem, say
+	  Y here.  This will result in additional debugging messages to be
+	  written to the system log.  Under normal circumstances, this
+	  results in very little overhead.
+
+endif # NILFS2_FS
fs/nilfs2/debug.h new file +56 -0

56 lines not on this page · raw message

Signature · 8 lines
1.7.9.5



--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html