aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2012-04-27 05:45:22 -0400
committerBen Myers <bpm@sgi.com>2012-05-14 17:20:37 -0400
commit81158e0cecdf53b1f6d88a514c6c20e0ee18ec7b (patch)
tree245eea9725a044314335625b265d29ac3b3fa729 /fs/xfs
parentd3bc815afb549eecb3679a4b2f0df216e34df998 (diff)
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>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/xfs_log_recover.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
index 396e3bfd0496..5540e79da6f5 100644
--- a/fs/xfs/xfs_log_recover.c
+++ b/fs/xfs/xfs_log_recover.c
@@ -440,6 +440,8 @@ xlog_find_verify_cycle(
440 * a log sector, or we're out of luck. 440 * a log sector, or we're out of luck.
441 */ 441 */
442 bufblks = 1 << ffs(nbblks); 442 bufblks = 1 << ffs(nbblks);
443 while (bufblks > log->l_logBBsize)
444 bufblks >>= 1;
443 while (!(bp = xlog_get_bp(log, bufblks))) { 445 while (!(bp = xlog_get_bp(log, bufblks))) {
444 bufblks >>= 1; 446 bufblks >>= 1;
445 if (bufblks < log->l_sectBBsize) 447 if (bufblks < log->l_sectBBsize)
@@ -1225,6 +1227,8 @@ xlog_write_log_records(
1225 * log sector, or we're out of luck. 1227 * log sector, or we're out of luck.
1226 */ 1228 */
1227 bufblks = 1 << ffs(blocks); 1229 bufblks = 1 << ffs(blocks);
1230 while (bufblks > log->l_logBBsize)
1231 bufblks >>= 1;
1228 while (!(bp = xlog_get_bp(log, bufblks))) { 1232 while (!(bp = xlog_get_bp(log, bufblks))) {
1229 bufblks >>= 1; 1233 bufblks >>= 1;
1230 if (bufblks < sectbb) 1234 if (bufblks < sectbb)