aboutsummaryrefslogtreecommitdiff
path: root/lib/string_helpers.c
diff options
context:
space:
mode:
authorBrian Foster <[email protected]>2017-08-08 18:21:53 -0700
committerDarrick J. Wong <[email protected]>2017-08-22 09:22:24 -0700
commita4c9b34d6a17081005ec459b57b8effc08f4c731 (patch)
treec0b42c9514c4820149a8e1bb18906efaf47c84f7 /lib/string_helpers.c
parent7f4d01f36a3ac16f539f0fd3839de5d58fa4940f (diff)
xfs: handle -EFSCORRUPTED during head/tail verification
Torn write and tail overwrite detection both trigger only on -EFSBADCRC errors. While this is the most likely failure scenario for each condition, -EFSCORRUPTED is still possible in certain cases depending on what ends up on disk when a torn write or partial tail overwrite occurs. For example, an invalid log record h_len can lead to an -EFSCORRUPTED error when running the log recovery CRC pass. Therefore, update log head and tail verification to trigger the associated head/tail fixups in the event of -EFSCORRUPTED errors along with -EFSBADCRC. Also, -EFSCORRUPTED can currently be returned from xlog_do_recovery_pass() before rhead_blk is initialized if the first record encountered happens to be corrupted. This leads to an incorrect 'first_bad' return value. Initialize rhead_blk earlier in the function to address that problem as well. Signed-off-by: Brian Foster <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]>
Diffstat (limited to 'lib/string_helpers.c')
0 files changed, 0 insertions, 0 deletions