Skip to content

ext3/jbd: possible filesystem corruption fixes (take 3)

Hidehiro Kawai linux-ext4 lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4jbd: abort when failed to log metadata buffersfs/jbd/commit.c+3 -02 replies
2/4jbd: fix error handling for checkpoint iofs/jbd/checkpoint.c fs/jbd/journal.c fs/jbd/recovery.c +1 more+65 -210 replies
3/4ext3: abort ext3 if the journal has abortedfs/ext3/ioctl.c fs/ext3/super.c+17 -61 reply
4/4jbd: don't dirty original metadata buffer on abortfs/jbd/commit.c+4 -10 replies

Reviews trailers per patch

3 of 4 patches have a Reviewed-by or Acked-by.

PatchJan Kara
1/4A-b
2/4A-b
3/4A-b
4/4

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] ext3/jbd: possible filesystem corruption fixes (take 3)

This patch set is the take 3 of fixing error handling problem in ext3/JBD. The previous discussion can be found here:
http://kerneltrap.org/mailarchive/linux-kernel/2008/6/2/2002094

Problem
=======
Currently some error checkings are missing, so the journal cannot abort correctly. This can cause a filesystem corruption. Missing error checkings are:

(1) error check for the metadata writes to the journal before the commit (addressed by PATCH 1/4)
(2) error check for checkpointing and replay (addressed by PATCH 2/4

    and 3/4)

PATCH 2/4 makes another problem worse; replaying old journaled metadata can overwrite the latest metadata on the filesystem and break its consistency. This is fixed by PATCH 4/4.

Changes since Take 2
====================
[PATCH x/x]
o file data error handling fixes were separated to other patch set

[PATCH 3/4]
o fix return value handlings (trivial)

[PATCH 4/4]
o newly added to prevent unjournaled metadata buffers from being written to the filesystem on abort

Regards,

Signature · 3 lines
Hidehiro Kawai
Hitachi, Systems Development Laboratory
Linux Technology Center