]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: prevent needless mount warning causing test failures
authorDave Chinner <dchinner@redhat.com>
Fri, 27 Apr 2012 09:45:22 +0000 (19:45 +1000)
committerBen Myers <bpm@sgi.com>
Mon, 14 May 2012 21:20:37 +0000 (16:20 -0500)
commit27b848256044e6c259bc85bf20df669ceece5d20
tree245eea9725a044314335625b265d29ac3b3fa729
parent64931479448456cb954160665b918a6abf755ee0
xfs: prevent needless mount warning causing test failures

Often mounting small filesystem with small logs will emit a warning
such as:

XFS (vdb): Invalid block length (0x2000) for buffer

during log recovery. This causes tests to randomly fail because this
output causes the clean filesystem checks on test completion to
think the filesystem is inconsistent.

The cause of the error is simply that log recovery is asking for a
buffer size that is larger than the log when zeroing the tail. This
is because the buffer size is rounded up, and if the right head and
tail conditions exist then the buffer size can be larger than the log.
Limit the variable size xlog_get_bp() callers to requesting buffers
smaller than the log.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
fs/xfs/xfs_log_recover.c