xfs: verify invalid metadata LSN detection
authorBrian Foster <bfoster@redhat.com>
Mon, 21 Dec 2015 07:00:29 +0000 (18:00 +1100)
committerDave Chinner <david@fromorbit.com>
Mon, 21 Dec 2015 07:00:29 +0000 (18:00 +1100)
commit2274eb58d862235c1635f0cd9cba5af9a168c1c3
tree32c996fe886ff3f756efdf47a36d11c51f6a910e
parent876161d54479c2edb3339bc9fd7598b36fac5a71
xfs: verify invalid metadata LSN detection

XFS v5 superblock fs' use metadata LSN tracking to determine when an
on-disk structure was last written to disk. This is used to ensure log
recovery operates correctly after an unclean shutdown. To work
correctly, the on-disk metadata LSNs must always remain behind the
current LSN with respect to the log.

Historically, xfs_repair had a problem where it incorrectly formats the
log to an LSN that is potentially behind existing metadata LSNs. As
such, xfs_repair and the kernel have been updated to prevent, detect and
recover from the problem. Add a test that intentionally formats the log
incorrectly and verifies that the fs fails to mount and that xfs_repair
detects the invalid metadata LSNs.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
tests/xfs/137 [new file with mode: 0755]
tests/xfs/137.out [new file with mode: 0644]
tests/xfs/group