]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
debugfs: teach logdump the -n <num_trans> option
authorlihaoxiang (F) <lihaoxiang9@huawei.com>
Thu, 14 Jul 2022 01:32:48 +0000 (09:32 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 13 Aug 2022 02:38:39 +0000 (22:38 -0400)
commit6e4cc3d5eeb2dfaa055e652b5390beaa6c3d05da
tree1d1d86470f39053d91399024318eb50effdb8729
parent47f9c3c00bbfdef4a64f400d1c95d9140aab3199
debugfs: teach logdump the -n <num_trans> option

The current version's debugfs possessed the function
logdump. Executing with option -O could output the log history. But
when it occurred the block which had no magic number in it's header,
the program would exit.

Sometimes we were locating problems, needed for more transactions that
had replayed instead of the latest batch of transactions and we
weren't hope to display all the history in the meanwhile. So we
introduced the option -n used for controlling the print of history
transactions.  Specially, this parameter was depending on the option
-O otherwise it couldn't work.

So in this modification, we used logdump with -O -n <num_trans>.  The
-n options causes logdump to continue past a block with a missing
magic nuber.  Instead, it will terminate only when the entire log has
been printed or after <num_trans> transactions.

Link: https://lore.kernel.org/r/608df030-593f-8c69-cb65-632a34729d23@huawei.com
Signed-off-by: lihaoxiang <lihaoxiang9@huawei.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
debugfs/debugfs.8.in
debugfs/logdump.c