linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 02/24] nilfs2: introduce base subsystem debugging output option
@ 2013-06-17 12:22 Vyacheslav Dubeyko
  0 siblings, 0 replies; only message in thread
From: Vyacheslav Dubeyko @ 2013-06-17 12:22 UTC (permalink / raw)
  To: linux-nilfs; +Cc: Ryusuke Konishi, Linux FS Devel

From: Vyacheslav Dubeyko <slava@dubeyko.com>
Subject: [PATCH 02/24] nilfs2: introduce base subsystem debugging output option

This patch adds subsystem's flags for super.c, the_nilfs.c, namei.c,
ioctl.c, inode.c, file.c, dir.c modules. Flags for these modules are
grouped by CONFIG_NILFS2_DEBUG_BASE_OPERATIONS kernel configuration
option. This kernel configuration option enables (or disables)
debugging output from of all above-mentioned modules.

Signed-off-by: Vyacheslav Dubeyko <slava@dubeyko.com>
CC: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
---
 fs/nilfs2/Kconfig |   23 +++++++++++++++++++++++
 fs/nilfs2/debug.h |   21 ++++++++++++++++++++-
 2 files changed, 43 insertions(+), 1 deletion(-)

diff --git a/fs/nilfs2/Kconfig b/fs/nilfs2/Kconfig
index a379d8e..d886e15 100644
--- a/fs/nilfs2/Kconfig
+++ b/fs/nilfs2/Kconfig
@@ -34,4 +34,27 @@ config NILFS2_DEBUG
 	  written to the system log.  Under normal circumstances, this
 	  results in very little overhead.
 
+if NILFS2_DEBUG
+
+config NILFS2_DEBUG_SUBSYSTEMS
+	bool "Enable output from subsystems"
+	depends on NILFS2_DEBUG
+	default n
+	help
+	  This option groups opportunity to enable debugging output from
+	  concrete NILFS2 driver's subsystems.
+
+if NILFS2_DEBUG_SUBSYSTEMS
+
+config NILFS2_DEBUG_BASE_OPERATIONS
+	bool "Enable base operations subsystem debugging output"
+	default n
+	help
+	  This option enables debugging output in super.c, the_nilfs.c,
+	  namei.c, ioctl.c, inode.c, file.c, dir.c modules.
+
+endif # NILFS2_DEBUG_SUBSYSTEMS
+
+endif # NILFS2_DEBUG
+
 endif # NILFS2_FS
diff --git a/fs/nilfs2/debug.h b/fs/nilfs2/debug.h
index c351120..ae264f9 100644
--- a/fs/nilfs2/debug.h
+++ b/fs/nilfs2/debug.h
@@ -26,10 +26,29 @@
 
 #include <linux/printk.h>
 
+/*
+ * These flags enable debugging output in modules that
+ * implement base file system operations functionality
+ * (super.c, the_nilfs.c, namei.c, ioctl.c, inode.c,
+ * file.c, dir.c).
+ */
+#define DBG_SUPER	0x00000002
+#define DBG_THE_NILFS	0x00000004
+#define DBG_NAMEI	0x00000008
+#define DBG_IOCTL	0x00000010
+#define DBG_INODE	0x00000020
+#define DBG_FILE	0x00000040
+#define DBG_DIR		0x00000080
+
 #ifdef CONFIG_NILFS2_DEBUG
 
 /* Definition of flags' set for debugging */
-static u32 DBG_MASK = (0);
+static u32 DBG_MASK = (
+#ifdef CONFIG_NILFS2_DEBUG_BASE_OPERATIONS
+	DBG_SUPER | DBG_THE_NILFS | DBG_NAMEI |
+	DBG_IOCTL | DBG_INODE | DBG_FILE | DBG_DIR |
+#endif /* CONFIG_NILFS2_DEBUG_BASE_OPERATIONS */
+0);
 
 #define NILFS2_SUBSYS_MASK	0x0FFFFFFF
 #define NILFS2_DBG_OUT_MASK	0xF0000000
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-06-17 12:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-17 12:22 [PATCH 02/24] nilfs2: introduce base subsystem debugging output option Vyacheslav Dubeyko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).