ext2 inode size patch - RE: PR kern/124621
Bruce M. Simpson
bms at FreeBSD.org
Wed Dec 3 23:31:04 PST 2008
Hi,
The inode size for the ext3 filesystem which Gentoo created for my last
install defaulted to 256 bytes, so I got bit by this problem.
I can't speak for the write path. but the read path looks just fine to
me, and the patch should go in ASAP.
Josh Carroll wrote:
>> Ok, I describe my concern once more. I do not object against the checking
>> of the inode size. But, if inode size is changed, then some data is added
>> to the inode, that could (and usually does, otherwise why extend it ?)
>> change intrerpetation of the inode. Thus, we need a verification of the
>> fact that simply ignoring added fields does not damage filesystem or
>> cause user data corruption. Verification != testing.
>>
If folk are paranoid, then add a check for dynamic inode size and
disable ext2fs writes by downgrading the mount in that case (We can do
that, right? Can someone make sure Josh gets the help he needs here?)
As Josh points out, the ext2 inode size is stored in the superblock.
Whilst it may vary between ext2 filesystems, *the inode size itself does
not appear to be something which one can modify in an existing ext2/3
filesystem*.
Older ext2 filesystems may not contain the inode size field in the
superblock, and the patch appears to default to 128 for that case. The
double indirection thus introduced doesn't concern me, our ext2fs is not
performance critical code, and the superblock is likely to sit in L2/L3
cache anyway (note: content free argument).
Thanks to Josh for fixing this problem.
cheers
BMS
More information about the freebsd-stable
mailing list