Skip to content

only run torn log write detection on dirty logs

Brian Foster linux-xfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4xfs: separate log head record discovery from verificationfs/xfs/xfs_log_recover.c+20 -220 replies
2/4xfs: refactor unmount record detection into helperfs/xfs/xfs_log_recover.c+93 -600 replies
3/4xfs: refactor in-core log state update to helperfs/xfs/xfs_log_recover.c+33 -190 replies
4/4xfs: only run torn log write detection on dirty logsfs/xfs/xfs_log_recover.c+31 -111 reply

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by.

PatchJan Beulich
1/4
2/4
3/4
4/4T-b

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

Read the v1 thread

Cover letter [PATCH 0/4] only run torn log write detection on dirty logs

Hi all,

This series addresses a problem reported by Jan Beulich here:

http://oss.sgi.com/pipermail/xfs/2016-February/047302.html

The problem in this particular x86 vs. x86-64 case is that the size of some of the log data structures change due to padding (e.g., struct xlog_rec_header). The more general problem is that torn log write detection unconditionally scans behind an unmount record on a cleanly mounted filesystem, and thus can trip over log data that might not have been written by the currently running system.

The solution implemented here is to limit torn write detection to when the log is dirty. Patches 1-3 refactor the existing code into some new helpers such that torn write detection can be made conditional. Patch 4 reorders the head/tail discovery logic to check for an unmount record at the head of the log and run torn write detection only when one is not present.

This survives xfstests on x86-64, x86 and ppc64 boxes. I've also run the log test group against a test volume that was preserved and passed back and forth across all three of the aforementioned arches without a problem. Thoughts, reviews, flames appreciated.

Brian

Brian Foster (4):
xfs: separate log head record discovery from verification
xfs: refactor unmount record detection into helper
xfs: refactor in-core log state update to helper
xfs: only run torn log write detection on dirty logs

 fs/xfs/xfs_log_recover.c | 271 +++++++++++++++++++++++++++++------------------
 1 file changed, 168 insertions(+), 103 deletions(-)
Signature · 6 lines
2.4.3

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs