missing y2038 support
missing y2038 support
Posted Mar 7, 2022 21:11 UTC (Mon) by arnd (subscriber, #8866)Parent article: When and why to deprecate filesystems
Side note: reiserfs doesn't actually have a y2038 problem at all, it uses unsigned 32-bit timestamps with a range from 1970 to 2106. https://kernelnewbies.org/y2038/vfs lists the limits, I think only ext2/ext3, coda, exofs, hostfs, and ufs1 still have the y2038 problem, and a few others have been changed to interpret the seconds as unsigned.
Posted Mar 8, 2022 2:02 UTC (Tue)
by NYKevin (subscriber, #129325)
[Link]
Posted Mar 8, 2022 8:03 UTC (Tue)
by pm215 (subscriber, #98099)
[Link] (5 responses)
[*] I think of all these as basically the same thing, which may or may not be an incorrect mental model, but which I suspect is not an uncommon one...
Posted Mar 8, 2022 8:22 UTC (Tue)
by TomH (subscriber, #56149)
[Link] (3 responses)
You can increase the size with "tune2fs -I <device>" but a fsck needs to be done first so the filesystem will need to be unmounted and you probably want to read what the manual page says before trying it.
Posted Mar 8, 2022 9:02 UTC (Tue)
by arnd (subscriber, #8866)
[Link]
Posted Mar 8, 2022 17:55 UTC (Tue)
by smurf (subscriber, #17840)
[Link]
SCNR …
Posted Mar 8, 2022 19:37 UTC (Tue)
by pm215 (subscriber, #98099)
[Link]
Posted Mar 8, 2022 8:48 UTC (Tue)
by arnd (subscriber, #8866)
[Link]
Posted Mar 10, 2022 17:42 UTC (Thu)
by jccleaver (guest, #127418)
[Link]
This really seems like something to bubble back up, at least in preparation for the actual post-2038 strategy. I can't think of a better solution for how to properly handle something that is perfectly readable fine but which has no way to encode properly-readable vital (i.e. security) metadata about an operation.
Just leave this feature flag disabled for now, and builders can enable it as desired; with a full flip in the years to come.
missing y2038 support
missing y2038 support
missing y2038 support
Ah, I did not know that tune2fs could do it, should have read your reply first. However, it seems this does not help with
missing y2038 support
Changing the inode size not supported for filesystems with the flex_bg feature enabled.
It apparently works on ext4 file systems without the flex_bg feature, and on ext2/ext3 images that do not support flex_bg in the first place, but apparently not on small ext4 images that were created with flex_bg or had it (irreversibly) added later.
missing y2038 support
missing y2038 support
I don't think you can convert between those in place without a full backup/restore.
One way to find out the inode format is to use the "stats" command in debugfs. It appears that at least in e2fsprogs version 1.45.7, the default in mkfs is still to use small inodes for smaller file system images, regardless of the file system type, so an ext2 file system image over 512MB is not actually compatible with the ext2 format unless you manually set the inode size, and smaller ext4 images continue having the y2038 problem:
missing y2038 support
$ truncate --size=511M ext4.img
$ mkfs -t ext4 -q ext4.img
$ echo stats | debugfs ext4.img 2>&1 | grep "Inode size"
Inode size: 128
$ truncate --size=512M ext2.img
$ mkfs -t ext2 -q ext2.img
$ echo stats | debugfs ext2.img 2>&1 | grep "Inode size"
Inode size: 256
The defaults are configured in /etc/mke2fs.conf, which on my system contains:
small = {
inode_size = 128
inode_ratio = 4096
}
Removing this bit makes mkfs use 256 byte inodes by default, regardless of the size.
missing y2038 support