]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_logprint: fix continuation transactions
authorDave Chinner <dchinner@redhat.com>
Thu, 9 May 2013 16:20:13 +0000 (11:20 -0500)
committerRich Johnston <rjohnston@sgi.com>
Thu, 9 May 2013 16:20:13 +0000 (11:20 -0500)
commit8e78288a3a994534a320f9699c91572f7c859b8c
tree39b0426bb1670fbb3fe5a71e6fd5266fe764ae8e
parent999f0b9c38baf5ef72535c6bb4df7ca0db677192
xfs_logprint: fix continuation transactions

As demonstrated by xfs/295, continuation transactions cause of
problems for xfs_logprint. The failure demonstrated by the test is
that the buffer log format structures are variable sized on disk -
the dirty bitmap is sized according to the buffer length, not fixed
to the length of the maximum supported buffer size.

xfs_logprint assumes that the buf log format reocrds are of fixed
size, and so when a short buffer is found it fails to handle it
properly and treats it like a continuation record.  This causses the
opheader pointer to be incremented incorrectly and then logprint
wanders off into a dark corner and gets eaten by a grue.

While fixing this, make the xlog_print_record code that does the
transaction opheader walking a little easier to read and stop it
from outputting binary data direct to the console by converting the
no-data-print case to use a hex dumping loop.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
logprint/log_misc.c