e2fsprogs/lib/e2p
Darrick J. Wong 38d5adf339 e2fsck/debugfs: fix descriptor block size handling errors with journal_csum
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.  These errors regrettably lead to the journal
corruption reported by Mr. Reardon.

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>
2014-09-11 12:40:54 -04:00
..
e2p.h libe2p: allow libe2p.h to be used in C++ programs 2014-02-07 17:25:28 -05:00
e2p.pc.in Change pkg-config files so that both <et/com_err.h> and <com_err.h> work 2012-05-14 12:45:54 -04:00
feature.c e2fsck/debugfs: fix descriptor block size handling errors with journal_csum 2014-09-11 12:40:54 -04:00
fgetflags.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
fgetversion.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
fsetflags.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
fsetversion.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
getflags.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
getversion.c Fix gcc -Wall nits 2013-01-01 13:28:27 -05:00
hashstr.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
iod.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
ls.c Merge branch 'maint' into next 2014-01-30 19:05:16 -05:00
Makefile.in Merge branch 'maint' into next 2014-07-06 00:09:27 -04:00
mntopts.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
ostype.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
parse_num.c e2p: Fix 's' handling in parse_num_blocks2() 2013-02-28 20:12:30 -05:00
pe.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
percent.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
pf.c libe2p/libext2fs: add EXT4_INLINE_DATA_FL flag 2012-08-07 14:06:47 -04:00
ps.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
setflags.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
setversion.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
uuid.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00