[PATCH 4/4] fuse2fs: record thread id in debug trace data

Darrick J. Wong
2025-11-06T22:41:12Z

Record the thread ID in the debug trace data so that we can trace
operations going through the fuse server more easily.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
misc/fuse2fs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/misc/fuse2fs.c b/misc/fuse2fs.c
index 9927a5d14c8fd2..33e456aa0a964c 100644
--- a/misc/fuse2fs.c
+++ b/misc/fuse2fs.c
@@ -148,7 +148,7 @@ static inline uint64_t round_down(uint64_t b, unsigned int align)

#define dbg_printf(fuse2fs, format, ...) \
while ((fuse2fs)->debug) { \
- printf("FUSE2FS (%s): " format, (fuse2fs)->shortdev, ##__VA_ARGS__); \
+ printf("FUSE2FS (%s): tid=%d " format, (fuse2fs)->shortdev, gettid(), ##__VA_ARGS__); \
fflush(stdout); \
break; \
}