Re: [PATCH 7/7] libext2fs: enforce the block group descriptor size in ext2fs_open()
From: Theodore Ts'o <tytso@mit.edu>
Date: 2012-08-03 00:00:08
From: Theodore Ts'o <tytso@mit.edu>
Date: 2012-08-03 00:00:08
On Wed, Aug 01, 2012 at 01:45:32PM -0700, Andreas Dilger wrote:
I'm pretty sure that we've always checked that it is a power-of-two value. The problem with this change is that it makes it much harder to increase the size again in the future .
Unfortunately, no, there aren't any such checks anywhere in either the kernel or e2fsck. In fact, e2fsck wasn't checking s_desc_size at all (although it was depending on it), which is what caused me to get very worried...
It would definitely need another feature flag, but it isn't clear without more investigation (that i can't do on my phone) if a COMPAT flag would be enough (which we would likely have anyway if we needed a larger descriptor) or if we need a more restrictive feature flag.
It seems very likely that any new feature that would require us to expand the block group descriptor would require other changes to the file system's structures that would require a more restrictive feature flag.... - Ted