coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: stat: reading btime on linux via statx


From: Eric Blake
Subject: Re: stat: reading btime on linux via statx
Date: Mon, 4 Mar 2019 11:44:10 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1

On 3/4/19 1:39 AM, Pádraig Brady wrote:


I would have just used the mask,
though searching I see that systemd also checks tv_sec.
So I'm thinking perhaps on some kernels/file systems
this is left at zero, without setting the mask.
Also this feature wasn't available in 1970 :),
so I thought it safer to keep that check.

It's not when the feature was introduced, but the timestamp of the file that the feature is used on. You are correct that no file system created in 1970 had btime, but file systems created after that point may have intentionally pre-dated a btime back to the earlier event.

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]