~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/ceph/ceph_debug.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef _FS_CEPH_DEBUG_H
  3 #define _FS_CEPH_DEBUG_H
  4 
  5 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
  6 
  7 #include <linux/string.h>
  8 
  9 #ifdef CONFIG_CEPH_LIB_PRETTYDEBUG
 10 
 11 /*
 12  * wrap pr_debug to include a filename:lineno prefix on each line.
 13  * this incurs some overhead (kernel size and execution time) due to
 14  * the extra function call at each call site.
 15  */
 16 
 17 # if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG)
 18 #  define dout(fmt, ...)                                                \
 19         pr_debug("%.*s %12.12s:%-4d : " fmt,                            \
 20                  8 - (int)sizeof(KBUILD_MODNAME), "    ",               \
 21                  kbasename(__FILE__), __LINE__, ##__VA_ARGS__)
 22 #  define doutc(client, fmt, ...)                                       \
 23         pr_debug("%.*s %12.12s:%-4d : [%pU %llu] " fmt,                 \
 24                  8 - (int)sizeof(KBUILD_MODNAME), "    ",               \
 25                  kbasename(__FILE__), __LINE__,                         \
 26                  &client->fsid, client->monc.auth->global_id,           \
 27                  ##__VA_ARGS__)
 28 # else
 29 /* faux printk call just to see any compiler warnings. */
 30 #  define dout(fmt, ...)                                        \
 31                 no_printk(KERN_DEBUG fmt, ##__VA_ARGS__)
 32 #  define doutc(client, fmt, ...)                               \
 33                 no_printk(KERN_DEBUG "[%pU %llu] " fmt,         \
 34                           &client->fsid,                        \
 35                           client->monc.auth->global_id,         \
 36                           ##__VA_ARGS__)
 37 # endif
 38 
 39 #else
 40 
 41 /*
 42  * or, just wrap pr_debug
 43  */
 44 # define dout(fmt, ...) pr_debug(" " fmt, ##__VA_ARGS__)
 45 # define doutc(client, fmt, ...)                                        \
 46         pr_debug(" [%pU %llu] %s: " fmt, &client->fsid,                 \
 47                  client->monc.auth->global_id, __func__, ##__VA_ARGS__)
 48 
 49 #endif
 50 
 51 #define pr_notice_client(client, fmt, ...)                              \
 52         pr_notice("[%pU %llu]: " fmt, &client->fsid,                    \
 53                   client->monc.auth->global_id, ##__VA_ARGS__)
 54 #define pr_info_client(client, fmt, ...)                                \
 55         pr_info("[%pU %llu]: " fmt, &client->fsid,                      \
 56                 client->monc.auth->global_id, ##__VA_ARGS__)
 57 #define pr_warn_client(client, fmt, ...)                                \
 58         pr_warn("[%pU %llu]: " fmt, &client->fsid,                      \
 59                 client->monc.auth->global_id, ##__VA_ARGS__)
 60 #define pr_warn_once_client(client, fmt, ...)                           \
 61         pr_warn_once("[%pU %llu]: " fmt, &client->fsid,                 \
 62                      client->monc.auth->global_id, ##__VA_ARGS__)
 63 #define pr_err_client(client, fmt, ...)                                 \
 64         pr_err("[%pU %llu]: " fmt, &client->fsid,                       \
 65                client->monc.auth->global_id, ##__VA_ARGS__)
 66 #define pr_warn_ratelimited_client(client, fmt, ...)                    \
 67         pr_warn_ratelimited("[%pU %llu]: " fmt, &client->fsid,          \
 68                             client->monc.auth->global_id, ##__VA_ARGS__)
 69 #define pr_err_ratelimited_client(client, fmt, ...)                     \
 70         pr_err_ratelimited("[%pU %llu]: " fmt, &client->fsid,           \
 71                            client->monc.auth->global_id, ##__VA_ARGS__)
 72 
 73 #endif
 74 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php