linux/fs/ext4
Darrick J. Wong 834adfb2e2 jbd2: fix descriptor block size handling errors with journal_csum
commit db9ee22036 upstream.

It turns out that there are some serious problems with the on-disk
format of journal checksum v2.  The foremost is that the function to
calculate descriptor tag size returns sizes that are too big.  This
causes alignment issues on some architectures and is compounded by the
fact that some parts of jbd2 use the structure size (incorrectly) to
determine the presence of a 64bit journal instead of checking the
feature flags.

Therefore, introduce journal checksum v3, which enlarges the
descriptor block tag format to allow for full 32-bit checksums of
journal blocks, fix the journal tag function to return the correct
sizes, and fix the jbd2 recovery code to use feature flags to
determine 64bitness.

Add a few function helpers so we don't have to open-code quite so
many pieces.

Switching to a 16-byte block size was found to increase journal size
overhead by a maximum of 0.1%, to convert a 32-bit journal with no
checksumming to a 32-bit journal with checksum v3 enabled.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reported-by: TR Reardon <thomas_reardon@hotmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-05 16:34:17 -07:00
..
Kconfig ext4: fix Kconfig documentation for CONFIG_EXT4_DEBUG 2013-04-21 20:32:03 -04:00
Makefile
acl.c ext2/3/4: use generic posix ACL infrastructure 2014-01-25 23:58:19 -05:00
acl.h ext2/3/4: use generic posix ACL infrastructure 2014-01-25 23:58:19 -05:00
balloc.c ext4: don't count free clusters from a corrupt block group 2013-10-31 11:46:31 -04:00
bitmap.c
block_validity.c fs/ext4: use rbtree postorder iteration helper instead of opencoding 2014-01-23 16:37:03 -08:00
dir.c fs/ext4: use rbtree postorder iteration helper instead of opencoding 2014-01-23 16:37:03 -08:00
ext4.h ext4: fix data integrity sync in ordered mode 2014-06-30 20:11:55 -07:00
ext4_extents.h ext4: isolate ext4_extents.h file 2013-08-28 14:47:06 -04:00
ext4_jbd2.c ext4: call ext4_error_inode() if jbd2_journal_dirty_metadata() fails 2013-12-02 09:31:36 -05:00
ext4_jbd2.h ext4: Fix misspellings using 'codespell' tool 2013-08-28 14:40:12 -04:00
extents.c ext4: fix premature freeing of partial clusters split across leaf blocks 2014-04-26 17:19:06 -07:00
extents_status.c ext4: fix a potential deadlock in __ext4_es_shrink() 2014-07-17 16:21:05 -07:00
extents_status.h ext4: isolate ext4_extents.h file 2013-08-28 14:47:06 -04:00
file.c ext4: use i_size_read in ext4_unaligned_aio() 2014-05-06 07:59:37 -07:00
fsync.c ext4: Fix fsync error handling after filesystem abort 2013-06-12 22:38:04 -04:00
hash.c
ialloc.c ext4: fix unjournalled bg descriptor while initializing inode bitmap 2014-07-17 16:21:05 -07:00
indirect.c ext4: Fix hole punching for files with indirect blocks 2014-07-09 11:18:27 -07:00
inline.c ext4: delete "set but not used" variables 2014-01-11 13:26:56 -05:00
inode.c ext4: update i_disksize coherently with block allocation on error path 2014-09-05 16:34:17 -07:00
ioctl.c ext4: fix error paths in swap_inode_boot_loader() 2014-02-12 11:48:31 -05:00
mballoc.c ext4: fix BUG_ON in mb_free_blocks() 2014-09-05 16:34:15 -07:00
mballoc.h
migrate.c ext4: Fix misspellings using 'codespell' tool 2013-08-28 14:40:12 -04:00
mmp.c ext4: use prandom_u32() instead of get_random_bytes() 2013-11-08 00:14:53 -05:00
move_extent.c vfs: pull ext4's double-i_mutex-locking into common code 2013-11-09 00:16:39 -05:00
namei.c Bug fixes and cleanups for ext4. We also enable the punch hole 2014-01-28 08:54:16 -08:00
page-io.c ext4: fix zeroing of page during writeback 2014-06-30 20:11:55 -07:00
resize.c ext4: fix online resize with a non-standard blocks per group setting 2014-02-15 22:42:25 -05:00
super.c jbd2: fix descriptor block size handling errors with journal_csum 2014-09-05 16:34:17 -07:00
symlink.c
truncate.h
xattr.c ext4: fix jbd2 warning under heavy xattr load 2014-05-06 07:59:37 -07:00
xattr.h ext2/3/4: use generic posix ACL infrastructure 2014-01-25 23:58:19 -05:00
xattr_security.c
xattr_trusted.c
xattr_user.c