Skip to content

xfs: log recovery wrap and tail overwrite fixes

Brian Foster linux-xfs 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 patches 1 replyIn review
  2. v14 patches 9 repliesSuperseded

Changes in v2 from the cover letter

- Fix 64-bit division.
- Fix up error checking in xlog_verify_[head|tail]() to only move tail tail on corruption and otherwise fail mount immediately.
- Added patch 5 to handle -EFSCORRUPTED on head/tail verification.
- Added patch 6 to introduce log head/tail tracepoint.
v1: http://www.spinics.net/lists/linux-xfs/msg07974.html
- Add patch to fix log recovery header wrapping problem.
- Replace transaction reservation rfc with log recovery based fix.
- Replace custom log pinning sysfs knob with error injection tag.
rfc: http://www.spinics.net/lists/linux-xfs/msg07623.html

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6xfs: fix recovery failure when log record header wraps log endfs/xfs/xfs_log_recover.c+14 -40 replies
2/6xfs: always verify the log tail during recoveryfs/xfs/xfs_log_recover.c+3 -230 replies
3/6xfs: fix log recovery corruption error due to tail overwritefs/xfs/xfs_log_recover.c+77 -310 replies
4/6xfs: add log item pinning error injection tagfs/xfs/xfs_error.c fs/xfs/xfs_error.h fs/xfs/xfs_trans_ail.c+22 -20 replies
5/6xfs: handle -EFSCORRUPTED during head/tail verificationfs/xfs/xfs_log_recover.c+3 -40 replies
6/6xfs: add log recovery tracepoint for head/tailfs/xfs/xfs_log_recover.c fs/xfs/xfs_trace.h+20 -00 replies

Reviews trailers per patch

2 of 6 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchDarrick J. Wong
SeriesR-b
1/6
2/6R-b
3/6
4/6R-b
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/6] xfs: log recovery wrap and tail overwrite fixes

Hi all,

This is v2 of the tail overwrite detection series. Patches 1-4 include mostly minor changes to fix up some error handling issues and whatnot. Patch 5 is new and updates both of the torn write and tail overwrite detection mechanisms to handle corruption errors along with crc mismatch errors. Patch 6 is also new and a trivial introduction of a tracepoint.

This has survived a decent amount of testing to this point with various block sizes, logbsize values, and feature settings (debug on/off, crc on/off, reflink on/off) on a couple different arches (x86-64, ppc64). Thoughts, reviews, flames appreciated.

Brian

v2:
- Fix 64-bit division.
- Fix up error checking in xlog_verify_[head|tail]() to only move tail tail on corruption and otherwise fail mount immediately.
- Added patch 5 to handle -EFSCORRUPTED on head/tail verification.
- Added patch 6 to introduce log head/tail tracepoint.
v1: http://www.spinics.net/lists/linux-xfs/msg07974.html
- Add patch to fix log recovery header wrapping problem.
- Replace transaction reservation rfc with log recovery based fix.
- Replace custom log pinning sysfs knob with error injection tag.
rfc: http://www.spinics.net/lists/linux-xfs/msg07623.html

Brian Foster (6):
xfs: fix recovery failure when log record header wraps log end
xfs: always verify the log tail during recovery
xfs: fix log recovery corruption error due to tail overwrite
xfs: add log item pinning error injection tag
xfs: handle -EFSCORRUPTED during head/tail verification
xfs: add log recovery tracepoint for head/tail

 fs/xfs/xfs_error.c       |   3 +
 fs/xfs/xfs_error.h       |   4 +-
 fs/xfs/xfs_log_recover.c | 157 +++++++++++++++++++++++++++++------------------
 fs/xfs/xfs_trace.h       |  18 ++++++
 fs/xfs/xfs_trans_ail.c   |  17 ++++-
 5 files changed, 137 insertions(+), 62 deletions(-)
Signature · 1 line
2.9.4