]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_logprint: Handle continued inode transactions
authorEric Sandeen <sandeen@sandeen.net>
Wed, 2 Jan 2013 23:03:52 +0000 (17:03 -0600)
committerBen Myers <bpm@sgi.com>
Tue, 29 Jan 2013 20:12:22 +0000 (14:12 -0600)
commita8cfa1a4c5ae346592316a88dc9b970ec10128da
treef11d426d465d364270b513b11d4137b62b524f4c
parentdda41291cb69517f6011f3773999ece3c717318b
xfs_logprint: Handle continued inode transactions

xlog_print_trans_inode() has a special case for 2
specific op_head->oh_len lengths.  If it matches
sizeof(xfs_inode_log_format_32_t) or
sizeof(xfs_inode_log_format_64_t), it assumes that
it's got an inode, and attempts to convert it and
print it accordingly.

However, if we arrive here via an op header which
is continued, then the length is simply a continuation
of the previous op, and it might *randomly* match the
size of one of the inode log formats, and thus get parsed
incorrectly.

Change the caller to pass in whether or not it's a continued
op, so that it can be handled correctly.

Tested by running xfs_logprint of TEST_DEV in xfsprogs
after sequential tests; without this change it gets off
in the weeds eventually; with this fix, it lasts longer,
until it hits some other yet-unfixed logprint bug...

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
logprint/log_misc.c