Hi, Theodore Tso wrote: > On Thu, Aug 27, 2009 at 01:54:39PM +0900, Akira Fujita wrote: >> When the AGGRESSIVE_TEST is enabled, >> the maximum extent count of inode becomes '3' in ext4_ext_space_root(), >> but __ext4_ext_check() which is called via ext4_fill_super() >> checks eh_max is larger '4', therefore we always get -EIO and can not mount ext4. >> The patch fix this issue. > > This isn't really the right fix for the problem. > > What's actually going on here is that the patch which added which > sanity checks for extents, which added (among other functions) > __ext4_ext_check() and ext4_ext_max_entries() doesn't quite work right > in the presence of AGGRESSIVE_TEST. > > The goal of AGGRESSIVE_TEST is to stress test the extent tree insert > and deletion code by forcing the size of eh_max to be a smaller value > than it otherwise would be. It did this by dropping in limits to the > values returned by ext4_ext_space_root(), ext4_ext_space_idx(), > ext4_ext_space_block(), and ext4_ext_block_idx(). This worked all > very well and coded when these functions were only used to initialize > the eh_max field. > > The problem is that the extent checking code also used these functions > to check whether or not the extent tree was sane, and if > AGGRESSIVE_TEST was enabled, it caused the journal to be considered > invalid. > > Your patch patches over the problem by changing ext4_ext_space_root to > fix the one case where a problem arises, which patches over the > problem for a freshly created filesystem, but it doesn't fix problems > that will arise for a populated filesystem. It also decreases the > effectiveness of AGGRESSIVE_TEST. > Thank you for careful explanation. :-) I confirmed that the problem was fixed with your patch. Tested-by: Akira Fujita <a-fujita@xxxxxxxxxxxx> Regards, Akira Fujita -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html