linux/fs/ext4
Eric Sandeen ffb5387e85 ext4: fix unjournaled inode bitmap modification
commit 119c0d4460 changed
ext4_new_inode() such that the inode bitmap was being modified
outside a transaction, which could lead to corruption, and was
discovered when journal_checksum found a bad checksum in the
journal during log replay.

Nix ran into this when using the journal_async_commit mount
option, which enables journal checksumming.  The ensuing
journal replay failures due to the bad checksums led to
filesystem corruption reported as the now infamous
"Apparent serious progressive ext4 data corruption bug"

[ Changed by tytso to only call ext4_journal_get_write_access() only
  when we're fairly certain that we're going to allocate the inode. ]

I've tested this by mounting with journal_checksum and
running fsstress then dropping power; I've also tested by
hacking DM to create snapshots w/o first quiescing, which
allows me to test journal replay repeatedly w/o actually
power-cycling the box.  Without the patch I hit a journal
checksum error every time.  With this fix it survives
many iterations.

Reported-by: Nix <nix@esperi.org.uk>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@vger.kernel.org
2012-10-28 22:24:57 -04:00
..
acl.c
acl.h
balloc.c ext4: Checksum the block bitmap properly with bigalloc enabled 2012-10-22 00:34:32 -04:00
bitmap.c ext4: Checksum the block bitmap properly with bigalloc enabled 2012-10-22 00:34:32 -04:00
block_validity.c
dir.c
ext4_extents.h
ext4_jbd2.c ext4: fix metadata checksum calculation for the superblock 2012-10-10 01:06:58 -04:00
ext4_jbd2.h
ext4.h ext4: Checksum the block bitmap properly with bigalloc enabled 2012-10-22 00:34:32 -04:00
extents.c ext4: race-condition protection for ext4_convert_unwritten_extents_endio 2012-10-10 01:04:58 -04:00
file.c mm: kill vma flag VM_CAN_NONLINEAR 2012-10-09 16:22:17 +09:00
fsync.c ext4: fix ext4_flush_completed_IO wait semantics 2012-10-05 11:31:55 -04:00
hash.c
ialloc.c ext4: fix unjournaled inode bitmap modification 2012-10-28 22:24:57 -04:00
indirect.c ext4: fix ext4_flush_completed_IO wait semantics 2012-10-05 11:31:55 -04:00
inode.c The big new feature added this time is supporting online resizing 2012-10-08 06:36:39 +09:00
ioctl.c The big new feature added this time is supporting online resizing 2012-10-08 06:36:39 +09:00
Kconfig
Makefile
mballoc.c Various bug fixes for ext4. The most serious of them fixes a security 2012-10-23 08:48:26 +03:00
mballoc.h
migrate.c
mmp.c
move_extent.c
namei.c
page-io.c ext4: fix ext4_flush_completed_IO wait semantics 2012-10-05 11:31:55 -04:00
resize.c ext4: Checksum the block bitmap properly with bigalloc enabled 2012-10-22 00:34:32 -04:00
super.c Various bug fixes for ext4. The most serious of them fixes a security 2012-10-23 08:48:26 +03:00
symlink.c
truncate.h
xattr_security.c
xattr_trusted.c
xattr_user.c
xattr.c
xattr.h