]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commitdiff
ceph: add process/thread ID into debug output
authorViacheslav Dubeyko <Slava.Dubeyko@ibm.com>
Thu, 6 Feb 2025 19:11:26 +0000 (11:11 -0800)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 11 Feb 2026 18:19:16 +0000 (19:19 +0100)
Process/Thread ID (pid) is crucial and essential info
during the debug and bug fix. It is really hard
to analyze the debug output without these details.
This patch addes PID info into the debug output.

Reviewed-by: Alex Markuze <amarkuze@redhat.com>
Signed-off-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
include/linux/ceph/ceph_debug.h

index 5f904591fa5f9e57eff115dd88ee948c38fe2260..6292db198f61da5c52cf983e8d941516237a5adc 100644 (file)
 
 # if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG)
 #  define dout(fmt, ...)                                               \
-       pr_debug("%.*s %12.12s:%-4d : " fmt,                            \
+       pr_debug("pid %d %.*s %12.12s:%-4d : " fmt,                     \
+                current->pid,                                          \
                 8 - (int)sizeof(KBUILD_MODNAME), "    ",               \
                 kbasename(__FILE__), __LINE__, ##__VA_ARGS__)
 #  define doutc(client, fmt, ...)                                      \
-       pr_debug("%.*s %12.12s:%-4d : [%pU %llu] " fmt,                 \
+       pr_debug("pid %d %.*s %12.12s:%-4d %s() : [%pU %llu] " fmt,     \
+                current->pid,                                          \
                 8 - (int)sizeof(KBUILD_MODNAME), "    ",               \
-                kbasename(__FILE__), __LINE__,                         \
+                kbasename(__FILE__), __LINE__, __func__,               \
                 &client->fsid, client->monc.auth->global_id,           \
                 ##__VA_ARGS__)
 # else