Skip to content

jbd: possible filesystem corruption fixes

Hidehiro Kawai linux-ext4 lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4jbd: strictly check for write errors on data buffersfs/jbd/commit.c+9 -50 replies
2/4jbd: ordered data integrity fixfs/jbd/transaction.c+13 -30 replies
3/4jbd: abort when failed to log metadata buffersfs/jbd/commit.c+3 -00 replies
4/4jbd/ext3: fix error handling for checkpoint iofs/ext3/ioctl.c fs/ext3/super.c fs/jbd/checkpoint.c +3 more+91 -280 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/4] jbd: possible filesystem corruption fixes

Subject: [PATCH 0/4] jbd: possible filesystem corruption fixes

The current JBD is not sufficient for I/O error handling. It can
cause filesystem corruption. An example scenario:

1. fail to write a metadata buffer to block B in the journal
2. succeed to write the commit record
3. the system crashes, reboots and mount the filesystem
4. in the recovery phase, succeed to read data from block B
5. write back the read data to the filesystem, but it is a stale metadata
6. lose some files and directories!

This scenario is a rare case, but it (temporal I/O error) can occur. If we abort the journal between 1. and 2., this tragedy can be avoided.

This patch set fixes several error handling problems to protect from filesystem corruption caused by I/O errors. It has been done only for JBD and ext3 parts.

This patch is against 2.6.25

[PATCH 1/4] jbd: strictly check for write errors on data buffers [PATCH 2/4] jbd: ordered data integrity fix
[PATCH 3/4] jbd: abort when failed to log metadata buffers [PATCH 4/4] jbd: fix error handling for checkpoint io

Regards,

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