Re: "beyond 2038" warnings from loopback mount is noisy

From: Qian Cai
Date: Tue Sep 03 2019 - 17:13:44 EST


On Tue, 2019-09-03 at 21:50 +0200, Arnd Bergmann wrote:
> On Tue, Sep 3, 2019 at 9:39 PM Andreas Dilger <adilger@xxxxxxxxx> wrote:
> >
> > On Sep 3, 2019, at 12:15 PM, Qian Cai <cai@xxxxxx> wrote:
> > >
> > > On Tue, 2019-09-03 at 09:36 -0700, Deepa Dinamani wrote:
> > > > We might also want to consider updating the file system the LTP is
> > > > being run on here.
> > >
> > > It simply format (mkfs.ext4) a loop back device on ext4 with the kernel.
> > >
> > > CONFIG_EXT4_FS=m
> > > # CONFIG_EXT4_USE_FOR_EXT2 is not set
> > > # CONFIG_EXT4_FS_POSIX_ACL is not set
> > > # CONFIG_EXT4_FS_SECURITY is not set
> > > # CONFIG_EXT4_DEBUG is not set
> > >
> > > using e2fsprogs-1.44.6. Do you mean people now need to update the kernel
> > > to
> > > enable additional config to avoid the spam of warnings now?
> >
> > Strange.ÂÂThe defaults for mkfs.ext4 _should_ default to use options that
> > allow enough space for the extra timestamps.
> >
> > Can you please provide "dumpe2fs -h" output for your filesystem, and the
> > formatting options that you used when creating this filesystem.
>
> According to the man page,
>
> ÂÂÂÂÂÂÂÂ"The default inode size is controlled by the mke2fs.conf(5)
> file.ÂÂIn the
> ÂÂÂÂÂÂÂÂÂmke2fs.conf file shipped withÂÂe2fsprogs, the default inode size is
> 256
> ÂÂÂÂÂÂÂÂÂbytes for most file systems, except for small file systems
> where the inode
> ÂÂÂÂÂÂÂÂÂsize will be 128 bytes."
>
> If this (small file systems) is the problem, then I think we need to
> do two things:
>
> 1. Change the per-inode warning to not warn if the inode size for the
> ÂÂÂÂfile system is less than 256. We already get a mount-time warning
> ÂÂÂÂin that case.
>
> 2. Change the mkfs.ext4 defaults to never pick a 128 byte inode unless
> ÂÂÂÂthe user really wants this (maybe not even then).

Indeed.

# dd if=/dev/zero of=small bs=1M count=50
50+0 records in
50+0 records out
52428800 bytes (52 MB, 50 MiB) copied, 0.0168322 s, 3.1 GB/s

# losetup -f small

# mkfs.ext4 /dev/loop0

# dumpe2fs -h /dev/loop0Â
dumpe2fs 1.44.6 (5-Mar-2019)
Filesystem volume name:ÂÂÂ<none>
Last mounted on:ÂÂÂÂÂÂÂÂÂÂ<not available>
Filesystem UUID:ÂÂÂÂÂÂÂÂÂÂ8cd1b7f1-dec9-45fc-807b-26cceedcdaa7
Filesystem magic number:ÂÂ0xEF53
Filesystem revision #:ÂÂÂÂ1 (dynamic)
Filesystem features:ÂÂÂÂÂÂhas_journal ext_attr resize_inode dir_index filetype
extent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize
metadata_csum
Filesystem flags:ÂÂÂÂÂÂÂÂÂunsigned_directory_hashÂ
Default mount options:ÂÂÂÂuser_xattr acl
Filesystem state:ÂÂÂÂÂÂÂÂÂclean
Errors behavior:ÂÂÂÂÂÂÂÂÂÂContinue
Filesystem OS type:ÂÂÂÂÂÂÂLinux
Inode count:ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ12824
Block count:ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ51200
Reserved block count:ÂÂÂÂÂ2560
Free blocks:ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ44440
Free inodes:ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ12813
First block:ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ1
Block size:ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ1024
Fragment size:ÂÂÂÂÂÂÂÂÂÂÂÂ1024
Group descriptor size:ÂÂÂÂ64
Reserved GDT blocks:ÂÂÂÂÂÂ256
Blocks per group:ÂÂÂÂÂÂÂÂÂ8192
Fragments per group:ÂÂÂÂÂÂ8192
Inodes per group:ÂÂÂÂÂÂÂÂÂ1832
Inode blocks per group:ÂÂÂ229
Flex block group size:ÂÂÂÂ16
Filesystem created:ÂÂÂÂÂÂÂTue SepÂÂ3 16:10:35 2019
Last mount time:ÂÂÂÂÂÂÂÂÂÂTue SepÂÂ3 16:10:42 2019
Last write time:ÂÂÂÂÂÂÂÂÂÂTue SepÂÂ3 16:10:48 2019
Mount count:ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ1
Maximum mount count:ÂÂÂÂÂÂ-1
Last checked:ÂÂÂÂÂÂÂÂÂÂÂÂÂTue SepÂÂ3 16:10:35 2019
Check interval:ÂÂÂÂÂÂÂÂÂÂÂ0 (<none>)
Lifetime writes:ÂÂÂÂÂÂÂÂÂÂ6050 kB
Reserved blocks uid:ÂÂÂÂÂÂ0 (user root)
Reserved blocks gid:ÂÂÂÂÂÂ0 (group root)
First inode:ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ11
Inode size: ÂÂÂÂÂÂÂÂÂÂ128
Journal inode:ÂÂÂÂÂÂÂÂÂÂÂÂ8
Default directory hash:ÂÂÂhalf_md4
Directory Hash Seed:ÂÂÂÂÂÂ6507a815-ee3a-4573-99c8-2f9103061dec
Journal backup:ÂÂÂÂÂÂÂÂÂÂÂinode blocks
Checksum type:ÂÂÂÂÂÂÂÂÂÂÂÂcrc32c
Checksum:ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ0x4b0ec46e
Journal features:ÂÂÂÂÂÂÂÂÂjournal_64bit journal_checksum_v3
Journal size:ÂÂÂÂÂÂÂÂÂÂÂÂÂ4096k
Journal length:ÂÂÂÂÂÂÂÂÂÂÂ4096
Journal sequence:ÂÂÂÂÂÂÂÂÂ0x00000004
Journal start:ÂÂÂÂÂÂÂÂÂÂÂÂ0
Journal checksum type:ÂÂÂÂcrc32c
Journal checksum:ÂÂÂÂÂÂÂÂÂ0x23f8be20