]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_logprint: Don't error out after split items lose context
authorEric Sandeen <sandeen@sandeen.net>
Mon, 3 Mar 2014 01:21:49 +0000 (12:21 +1100)
committerDave Chinner <david@fromorbit.com>
Mon, 3 Mar 2014 01:21:49 +0000 (12:21 +1100)
commita223e63682bece46eda34fdb9ccb5ec243cd9e2a
tree6c6daf667a070bdaba7a348011f1e9ee7462d62a
parenta872b6221db3457a0288b39e3b32b66a66ba71f6
xfs_logprint: Don't error out after split items lose context

xfs_logprint recognizes a "left over region from split log item"
but then expects the *next* op to be a valid start to a new
item.  The problem is, we can split i.e. an xfs_inode_log_format
item, skip over it, and then land on the xfs_icdinode_t
data which follows it - this doesn't have a valid log item
magic (XFS_LI_*) and we error out.  This results in something
like:

  xfs_logprint: unknown log operation type (494e)

Fix this by recognizing that we've skipped over an item and
lost the context we're in, so just continue skipping over
op headers until we find the next valid start to a log item.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
logprint/log_misc.c