birthtime initialization
Poul-Henning Kamp
phk at phk.freebsd.dk
Tue Jul 22 11:41:17 UTC 2008
In message <20080722075718.GA1881 at a91-153-120-204.elisa-laajakaista.fi>, Jaakko
Heinonen writes:
>On 2008-06-02, Bruce Evans wrote:
>[about patch for ext2fs in PR kern/122047]
>> % + vap->va_birthtime.tv_sec = 0;
>> % + vap->va_birthtime.tv_nsec = 0;
>>
>> This is unrelated and should be handled centrally. Almost all file
>> systems get this wrong. Most fail to set va_birthtime, so stat()
>> returns kernel stack garbage for st_birthtime. ffs1 does the same
>> as the above. msdosfs does the above correctly, by setting tv_sec to
>> (time_t)-1 in unsupported cases.
>
>How about this patch?
Looks like something Kirk forgot to me.
We want to macroize the NOVAL for timespec instead of spreading
-1 casts all over.
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the freebsd-fs
mailing list