On Wed Nov 18, 2026 at 3:26 PM CET, Pali Rohár wrote: > Hello, > > I have just one issue with the userspace API. It does not allow me to > figure out what is the source of statx btime field. If it is fs ptime or > fs btime because this RFC implementation is mixing both fs ptime and > fs btime into the statx btime field. > > I have feeling that this is quite a mess in API and I would like to see > a clear distinguish between btime and ptime in the API, like there is a > difference in the fs storage. > > If the btime is used for forensic analysis then somehow I would expect > that the statx would not report / not fill changeable ptime value into > the statx btime. Hi, for native linux filesystems it will report ptime as PTIME and btime as BTIME (also semnatically), for the windows-like ones that only have ptime (semantically) I think it's reasonable to not expect btime to be immutable, since they are meant to be used with other OSs who lack btime semantics. > It would be really helpful if the statx API on inode can differ between: > > 1. btime is present and its value is ..., ptime is not supported > 2. btime is not supported, ptime is set to value ... > 3. btime is present and its value is ..., ptime is set to value ... > 4. both btime and ptime are not supported > > This should cover all cases of different filesystems and also allows > userspace to do proper backup of both ptime and btime fields (if it want > to do forensic analysis or anything else). These should already all be covered by STATX_BTIME/PTIME and their fields in struct statx, the only problems are windows-like filesystems, which IMO shuold be handled as mentioned above. Of course, as in the other discussion, I'm open to changing ptime NTFS/exFAT/... support to remove btime altogether and only use ptime for their own crtime if that's what wanted (I'm fairly impartial on this specific issue). Thanks, koraynilay > > Pali