On Tue, Nov 05, 2024 at 12:10:25AM +0100, Thorsten Glaser wrote: > On Mon, 4 Nov 2024, Theodore Ts'o wrote: > > >> (I had tune2fs -r in the back of my head.) > > > >I've aways used mke2fs -m and tune2fs -m, myself. I personally very > >rarely using -m 0. > > I use -r 2048 or something like that much more than -m, that’s why.
Fortunately, if you had tried -r 2048 with mke2fs, it wouldn't have worked: % mke2fs -t ext4 -r 2048 /tmp/foo.img 1M mke2fs: Filesystem revision too high while trying to create revision 2048 > >So there's no mystery there. It's doing this because for revision 0 > >file system sb->s_first_ino and sb->s_inode_size are undefined. > > OK, so treating them as “you’ve got a Y2038 problem and maybe more” > is probably right? Yeah, it's "you have a file system which is suitble for Linux 1.2, and not much more". > tg@cafe:~ $ sudo mke2fs -Fq -t ext4 -r 0 /dev/vg-cafe/lv-tmp2 > tg@cafe:~ $ sudo mount /dev/vg-cafe/lv-tmp2 /mnt > tg@cafe:~ $ sudo dmesg | tail > […] > [166741.746069] EXT4-fs (dm-8): mounting ext2 file system using the ext4 > subsystem > [166741.806706] EXT4-fs (dm-8): mounted filesystem without journal. Opts: > (null) > tg@cafe:~ $ uname -a > Linux cafe.XXX 5.10.0-33-amd64 #1 SMP Debian 5.10.226-1 (2024-10-03) x86_64 > GNU/Linux > > So perhaps it got changed in the meantime. root@kvm-xfstests:~# mke2fs -Fq -r 0 /dev/vdc /dev/vdc contains a ext2 file system created on Mon Nov 4 00:57:25 2024 root@kvm-xfstests:~# mount /dev/vdc /vdc [ 72.286885] ext2 filesystem being mounted at /vdc supports timestamps until 2038 (0x7fffffff) root@kvm-xfstests:~# uname -a Linux kvm-xfstests 5.10.208-xfstests #7 SMP Sat Oct 5 17:17:16 EDT 2024 x86_64 GNU/Linux root@kvm-xfstests:~# In any case, Debian stable has 6.1, and it also seems to do the right thing: root@kvm-xfstests:~# mount /dev/vdc /vdc [ 6.823271] EXT2-fs (vdc): warning: mounting unchecked fs, running e2fsck is recommended [ 6.825849] ext2 filesystem being mounted at /vdc supports timestamps until 2038 (0x7fffffff) root@kvm-xfstests:~# uname -a Linux kvm-xfstests 6.1.74-xfstests #5 SMP PREEMPT_DYNAMIC Mon Nov 4 21:01:44 EST 2024 x86_64 GNU/Linux > >(This is using my kvm-xfstests test appliance, which is a super > >convenient way to experiment and run tests for file systems > > Perhaps, but I’m chiefly on Debian here. The test appliance in kvm-xfstests, gce-xfstest, and android-xfstests is building using debootstrap and is based on Debian stable: root@kvm-xfstests:~# cat /etc/issue Debian GNU/Linux 12 \n \l > >I don't see any changes which are needed for the kernel. From my > >experiments using kvm-xfstest, everything is working appropriately. > > Might be useful to use a different warning format for rev0 fs > because otherwise people will think they can just use tune2fs -I > and it’ll be a while until the fix (below) will percolate to people. WQe could add a rev 0 specific warning to the kernel, but it seems likely that a new version of e2fsprogs might very well make it out to people sooner. That being said, this is the first time in decades I've become award that anyone had mistakenly used mke2fs -r 0. While I'm sure you're not the only person who has run into this, I don't think it's a common mistake. As a result, I don't feel a lot of urgency to fixing this; at least, I don't think it requires asking the Debian release team to push out emergency fixes to Debian Stable.... Cheers, - Ted