summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_trans.c
diff options
context:
space:
mode:
authorBrian Foster <bfoster@redhat.com>2020-03-25 09:17:13 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2020-03-26 08:19:24 -0700
commit842a42d126b488fa1b2c15ecf60f375f0ab74ed7 (patch)
tree59d28c072d36facb09c54dce135e6eee70b6948c /fs/xfs/xfs_trans.c
parentd59f44d3e723c4f7143d910dfa333f2bdb587bbc (diff)
xfs: shutdown on failure to add page to log bio
If the bio_add_page() call fails, we proceed to write out a partially constructed log buffer. This corrupts the physical log such that log recovery is not possible. Worse, persistent occurrences of this error eventually lead to a BUG_ON() failure in bio_split() as iclogs wrap the end of the physical log, which triggers log recovery on subsequent mount. Rather than warn about writing out a corrupted log buffer, shutdown the fs as is done for any log I/O related error. This preserves the consistency of the physical log such that log recovery succeeds on a subsequent mount. Note that this was observed on a 64k page debug kernel without upstream commit 59bb47985c1d ("mm, sl[aou]b: guarantee natural alignment for kmalloc(power-of-two)"), which demonstrated frequent iclog bio overflows due to unaligned (slab allocated) iclog data buffers. Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/xfs_trans.c')
0 files changed, 0 insertions, 0 deletions