Subject: Re: bug#41495: stat birth time issues with coreutils-8.32

From: Andrew Mahoney <[email-masked]>
Date: Sun, 24 May 2020 11:12:10 -0700

On 2020-05-24 7:45 a.m., Pádraig Brady wrote:
> On 23/05/2020 22:58, Andy wrote:
>> On my arch linux system, I can't see birth time with coreutils-8.32 with
>> either of
>> - zfs mounts
>> - ext4 mounts
>>
>> But I am having success with:
>> - smb mounts
>>
>> ==============
>> System details:
>>
>> stat --version
>>   > stat (GNU coreutils) 8.32
>>
>> pacman -Qi coreutils
>>   > version 8.32-1
>>
>> uname -a
>>   > 5.6.14-arch1-1 #1 SMP PREEMPT Wed, 20 May 2020 20:43:19 +0000 x86_64
>> GNU/Linux
>>
>>
>> ==========================
>> Reproducible example with ext4 mount:
>>
>> dd if=/dev/zero of=test.img bs=1M count=10
>> mkfs.ext4 test.img
>> mkdir testext4
>> sudo mount -o loop test.img ~/testext4
>> sudo chown -R andy:andy testext4
>> touch testext4/bloop
>> stat testext4/bloop
>>
>>     File: testext4/bloop
>>     Size: 0               Blocks: 0          IO Block: 1024 regular 
>> empty
>> file
>> Device: 700h/1792d      Inode: 12          Links: 1
>> Access: (0644/-rw-r--r--)  Uid: ( 1000/    andy)   Gid: ( 1000/ andy)
>> Access: 2020-05-23 13:48:01.000000000 -0700
>> Modify: 2020-05-23 13:47:59.000000000 -0700
>> Change: 2020-05-23 13:47:59.000000000 -0700
>>    Birth: -
>
> I think your ext4 file system may be too small to have appropriately
> sized indoes to support birth time. The man page suggests you
> would have 128 byte inodes for such a small file system.
> You should be able to override that with: mkfs.ext4 -I 256 test.img

Thanks you are correct, birth time appears correctly with that option.

I think this can be closed, not a bug with coreutils. For the remaining 
issue it seems zfs doesn't support statx with birth time yet:

https://github.com/openzfs/zfs/issues/8507