On Tue, Sep 03, 2019 at 02:31:06PM -0700, Deepa Dinamani wrote: > > We need to drop this commit (ext4: Initialize timestamps limits), or > > at least the portion which adds the call to the EXT4_INODE_SET_XTIME > > macro in ext4.h. > > As Arnd said, I think this can be fixed by warning only when the inode > size is not uniformly 128 bytes in ext4.h. Is this an acceptable > solution or we want to drop this warning altogether? If we have a mount-time warning, I really don't think a warning in the kernel is going to be helpful. It's only going to catch the most extreme cases --- specifically, a file system originally created and written using ext3 (real ext3; even before we dropped ext3 from the upstream kernel, most distributions were using ext4 to provide ext3 support) and which included enough extended attributes that there is no space in the inode and the external xattr block for there to make space for the extra timestamp. That's extremely rare edge cases, and I don't think it's worth trying to catch it in the kernel. The right place to catch this is rather in e2fsck, I think. > We have a single mount time warning already in place here. I did not > realize some people actually chose to use 128 byte inodes on purpose. Yes, there are definitely some people who are still doing this. The other case, as noted on this thread, is that file systems smaller than 512 MiB are treated as type "small" (and file systems smaller than 4MiB are treated as type "floppy"), and today, we are still using 128 byte inodes to minimize the overhead of the inode table. It's probably time to reconsider these defaults, but that's an e2fsprogs level change. And that's not going to change the fact that there are people who are deliberately choosing to use 128 byte inode. Changes that we could consider: 1) Change the default for types "small" and "floppy" to be 256 byte inodes. 2) Add a warning to mke2fs to give a warning when creating a file system with 128 byte inodes. 3) Add code to e2fsck to automatically make room for the timestamp if possible. 4) Add code to e2fsck so that at some pre-determined point in the future (maybe 5 years before 2038?) have it print warnings for file systems using 128 byte inodes, and for file systems with 256+ byte inodes and where there isn't enough space in the inode for expanded timestamps. Cheers, - Ted