ext4: fix extent sanity checking code with AGGRESSIVE_TEST
authorTheodore Ts'o <tytso@mit.edu>
Fri, 28 Aug 2009 14:40:33 +0000 (10:40 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 28 Aug 2009 14:40:33 +0000 (10:40 -0400)
commit55ad63bf3a30936aced50f13452735c2f58b234c
tree13733cfa690c83a0a75d8d38489e3cace096f9f9
parenta36b44988cef1fc007535107013571fa691a2d7f
ext4: fix extent sanity checking code with AGGRESSIVE_TEST

The extents sanity-checking code depends on the ext4_ext_space_*()
functions returning the maximum alloable size for eh_max; however,
when the debugging #ifdef AGGRESSIVE_TEST is enabled to test the
extent tree handling code, this prevents a normally created ext4
filesystem from being mounted with the errors:

Aug 26 15:43:50 bsd086 kernel: [   96.070277] EXT4-fs error (device sda8): ext4_ext_check_inode: bad header/extent in inode #8: too large eh_max - magic f30a, entries 1, max 4(3), depth 0(0)
Aug 26 15:43:50 bsd086 kernel: [   96.070526] EXT4-fs (sda8): no journal found

Bug reported by Akira Fujita.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/extents.c