android_kernel_google_msm/fs/ext4
Eric Sandeen 0d81906849 ext4: fix unjournaled inode bitmap modification
commit ffb5387e85 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-05 09:50:41 +01:00
..
acl.c
acl.h
balloc.c ext4: pass a char * to ext4_count_free() instead of a buffer_head ptr 2012-08-09 08:31:40 -07:00
bitmap.c ext4: fix overhead calculation used by ext4_statfs() 2012-08-09 08:31:41 -07:00
block_validity.c
dir.c Merge branch 'for-3.4' of git://linux-nfs.org/~bfields/linux 2012-03-29 14:53:25 -07:00
ext4.h ext4: fix overhead calculation used by ext4_statfs() 2012-08-09 08:31:41 -07:00
ext4_extents.h ext4: add no_printk argument validation, fix fallout 2012-03-19 23:11:43 -04:00
ext4_jbd2.c
ext4_jbd2.h ext4: expand commit callback and 2012-02-20 17:53:02 -05:00
extents.c ext4: race-condition protection for ext4_convert_unwritten_extents_endio 2012-10-28 10:14:12 -07:00
file.c
fsync.c ext4: fix race between sync and completed io work 2012-03-05 10:29:52 -05:00
hash.c ext4: return 32/64-bit dir name hash according to usage type 2012-03-18 22:44:40 -04:00
ialloc.c ext4: fix unjournaled inode bitmap modification 2012-11-05 09:50:41 +01:00
indirect.c
inode.c ext4: fix fdatasync() for files with only i_size changes 2012-10-13 05:38:50 +09:00
ioctl.c ext4: fix duplicated mnt_drop_write call in EXT4_IOC_MOVE_EXT 2012-07-29 08:04:19 -07:00
Kconfig
Makefile
mballoc.c ext4: Avoid underflow in ext4_trim_fs() 2012-10-28 10:14:12 -07:00
mballoc.h ext4: remove EXT4_MB_{BITMAP,BUDDY} macros 2012-02-20 17:54:06 -05:00
migrate.c ext4: using PTR_ERR() on the wrong variable in ext4_ext_migrate() 2012-02-20 17:53:06 -05:00
mmp.c ext4: Fix endianness bug when reading the MMP block 2012-02-27 01:09:03 -05:00
move_extent.c ext4: online defrag is not supported for journaled files 2012-10-13 05:38:49 +09:00
namei.c ext4: always set i_op in ext4_mknod() 2012-10-13 05:38:49 +09:00
page-io.c Revert "ext4: don't release page refs in ext4_end_bio()" 2012-03-29 17:00:56 -07:00
resize.c ext4: avoid duplicate writes of the backup bg descriptor blocks 2012-10-13 05:38:48 +09:00
super.c ext4: fix crash when accessing /proc/mounts concurrently 2012-10-13 05:38:49 +09:00
symlink.c
truncate.h
xattr.c ext4: add no_printk argument validation, fix fallout 2012-03-19 23:11:43 -04:00
xattr.h
xattr_security.c Merge branch 'for_linus' into for_linus_merged 2012-01-10 11:54:07 -05:00
xattr_trusted.c
xattr_user.c