summaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/include/linux
diff options
context:
space:
mode:
authorJinshan Xiong <jinshan.xiong@intel.com>2016-04-04 21:36:49 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-04-11 20:47:04 -0700
commit6f11cd978e59551de52e018c7bf8fc9d6ae6366c (patch)
treef962f954d2778913adc0e1a914d784e3ab74a4f6 /drivers/staging/lustre/include/linux
parent66fbe4ef96790b55b4218b0281cc26157993552b (diff)
downloadop-kernel-dev-6f11cd978e59551de52e018c7bf8fc9d6ae6366c.zip
op-kernel-dev-6f11cd978e59551de52e018c7bf8fc9d6ae6366c.tar.gz
staging: lustre: libcfs: create array of debug names
Instead of a using a growing case statement to handle more debugging options create a array to map debug flags to string names. Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3647 Reviewed-on: http://review.whamcloud.com/7243 Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/include/linux')
-rw-r--r--drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h
index 7472a31..5e60c6f 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h
@@ -118,6 +118,12 @@ struct ptldebug_header {
#define S_FID 0x40000000 /* b_new_cmd */
#define S_FLD 0x80000000 /* b_new_cmd */
+#define LIBCFS_DEBUG_SUBSYS_NAMES { \
+ "undefined", "mdc", "mds", "osc", "ost", "class", "log", \
+ "llite", "rpc", "mgmt", "lnet", "lnd", "pinger", "filter", "", \
+ "echo", "ldlm", "lov", "lquota", "osd", "lfsck", "", "", "lmv", \
+ "", "sec", "gss", "", "mgc", "mgs", "fid", "fld", NULL }
+
/* Debugging masks (32 bits, non-overlapping) */
#define D_TRACE 0x00000001 /* ENTRY/EXIT markers */
#define D_INODE 0x00000002
@@ -151,6 +157,13 @@ struct ptldebug_header {
#define D_HSM D_TRACE
+#define LIBCFS_DEBUG_MASKS_NAMES { \
+ "trace", "inode", "super", "ext2", "malloc", "cache", "info", \
+ "ioctl", "neterror", "net", "warning", "buffs", "other", \
+ "dentry", "nettrace", "page", "dlmtrace", "error", "emerg", \
+ "ha", "rpctrace", "vfstrace", "reada", "mmap", "config", \
+ "console", "quota", "sec", "lfsck", "hsm", NULL }
+
#define D_CANTMASK (D_ERROR | D_EMERG | D_WARNING | D_CONSOLE)
#ifndef DEBUG_SUBSYSTEM
OpenPOWER on IntegriCloud