Whamcloud - gitweb
e2fsck: print thread log properly
authorLi Xi <lixi@ddn.com>
Mon, 26 Aug 2019 14:34:06 +0000 (22:34 +0800)
committerLi Dongyang <dongyangli@ddn.com>
Fri, 28 Apr 2023 00:43:50 +0000 (10:43 +1000)
commit3a27d37c9d77ae68b2e0fd9a466a3a0f234a8bfb
tree8c0fb79e5846cbff44b3bd4da8d5a0a6fdbcf00d
parent60ba6c02112d05b4e30070a45949c80467923987
e2fsck: print thread log properly

When multi-thread fsck is enabled, logs printed from multiple
threads could overlap with each other. The overlap sometimes
makes the logs unreadable because log_out() is used multiple times
for a single line.

This patch adds leading [Thread XXX] to each logs if multi-thread
is enabed by -m option.

This patch also adds message to show the group ranges and inode
numbers for each thread, which is useful for debuging multi-thread
check.

E2fsprogs-commit: 5b071ed80deca2cdc87585a673076529dd47ca6e

Change-Id: I4bd08bc48813a399ab3a79130ff159b12d22f3a0
Signed-off-by: Li Xi <lixi@ddn.com>
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
e2fsck/e2fsck.h
e2fsck/logfile.c
e2fsck/pass1.c
e2fsck/problem.c
e2fsck/util.c
tests/f_multithread/expect.1
tests/f_multithread_logfile/expect.1
tests/f_multithread_no/expect.1