Skip to content

Checkpointing fixes and cleanups

Jan Kara linux-ext4 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v3 Latest8 patches 6 repliesIn review

Changes in v3 from the cover letter

Rewrote the code pushing log tail to fix race described by Ted. Improved some comments

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8jbd2: Split updating of journal superblock and marking journal emptyfs/jbd2/checkpoint.c fs/jbd2/commit.c fs/jbd2/journal.c +1 more+98 -700 replies
2/8jbd2: Protect all log tail updates with j_checkpoint_mutexfs/jbd2/commit.c fs/jbd2/journal.c+18 -30 replies
3/8jbd2: Issue cache flush after checkpointing even with internal journalfs/jbd2/checkpoint.c fs/jbd2/commit.c fs/jbd2/journal.c +3 more+148 -873 replies
4/8jbd2: Fix BH_JWrite setting in checkpointing codefs/jbd2/checkpoint.c+0 -20 replies
5/8jbd2: __jbd2_journal_temp_unlink_buffer() is staticfs/jbd2/transaction.c+2 -20 replies
6/8jbd2: Remove always true condition in __journal_try_to_free_buffer()fs/jbd2/transaction.c+2 -40 replies
7/8jbd2: Remove bh_state lock from checkpointing codefs/jbd2/checkpoint.c+7 -510 replies
8/8jbd2: Cleanup journal tail after transaction commitfs/jbd2/commit.c fs/jbd2/journal.c include/linux/jbd2.h+46 -02 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH 0/8 v3] Checkpointing fixes and cleanups

Hello,

this is a third round of my checkpointing fixes. The patch set is primarily
aimed at fixing filesystem corruption happening occasionally (rather rarely) after power failure. First three patches should fix the issue. Patches 4-7 are assorted checkpointing cleanups I've gathered when inspecting checkpointing code. Finally patch 8 is a possible speedup of checkpoining - we can use cache flushes happening during transaction commits for pushing the journal tail safely. The observable speedup is disputable since jbd2_cleanup_journal_tail() is called rather rarely (for metadata heavy load I saw about one jbd2_cleanup_journal_tail() for about 200 commits) so the cost of additional cache flush will be likely in the noise. But the patch is simple enough so I send it for others to judge whether it makes sense or not.

Changes since v2:
Rewrote the code pushing log tail to fix race described by Ted. Improved some comments

Honza