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>