RESOLVED FIXED 144989
[SOUP] Use st_birthtime on FreeBSD and NetBSD instead of setting xattr
https://bugs.webkit.org/show_bug.cgi?id=144989
Summary [SOUP] Use st_birthtime on FreeBSD and NetBSD instead of setting xattr
Ting-Wei Lan
Reported 2015-05-13 23:15:53 PDT
FreeBSD and NetBSD have st_birthtime in struct stat, so we can easily get creation time of files without manually setting xattr. There is existing code for PLATFORM(COCOA), and we can just reuse it. FreeBSD xattr API is incompatible with Linux xattr API, so GLib doesn't support it. st_birthtime works on both UFS2 and tmpfs. NetBSD xattr has a compatible interface with Linux xattr, but it is only supported on old filesystem such as UFS1. st_birthtime works on both UFS2 and tmpfs.
Attachments
Patch (3.44 KB, patch)
2015-05-13 23:19 PDT, Ting-Wei Lan
no flags
Patch (4.52 KB, patch)
2015-05-16 11:48 PDT, Ting-Wei Lan
no flags
Patch (4.45 KB, patch)
2015-05-19 07:03 PDT, Ting-Wei Lan
no flags
Ting-Wei Lan
Comment 1 2015-05-13 23:19:46 PDT
Carlos Garcia Campos
Comment 2 2015-05-14 00:35:49 PDT
Comment on attachment 253099 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=253099&action=review > Source/WebKit2/NetworkProcess/cache/NetworkCacheFileSystemPosix.h:80 > -#if PLATFORM(COCOA) > +#if PLATFORM(COCOA) || (USE(SOUP) && (OS(DARWIN) || OS(FREEBSD) || OS(NETBSD))) Maybe we could simplify this by defining a macro for this in WTF/wtf/Platform.h, something like HAVE_STAT_BIRTHTIME or something similar.
Ting-Wei Lan
Comment 3 2015-05-16 11:48:11 PDT
Carlos Garcia Campos
Comment 4 2015-05-17 23:24:02 PDT
Comment on attachment 253272 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=253272&action=review > Source/WebKit2/NetworkProcess/cache/NetworkCacheFileSystemPosix.h:80 > -#if PLATFORM(COCOA) > +#if PLATFORM(COCOA) || (USE(SOUP) && HAVE(STAT_BIRTHTIME)) I think we could use just #if HAVE(STAT_BIRTHTIME)
Darin Adler
Comment 5 2015-05-18 08:39:27 PDT
Comment on attachment 253272 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=253272&action=review >> Source/WebKit2/NetworkProcess/cache/NetworkCacheFileSystemPosix.h:80 >> +#if PLATFORM(COCOA) || (USE(SOUP) && HAVE(STAT_BIRTHTIME)) > > I think we could use just #if HAVE(STAT_BIRTHTIME) Yes, that’s right.
Ting-Wei Lan
Comment 6 2015-05-19 07:03:41 PDT
Carlos Garcia Campos
Comment 7 2015-05-19 08:12:21 PDT
Comment on attachment 253384 [details] Patch Thanks!
WebKit Commit Bot
Comment 8 2015-05-19 09:37:19 PDT
Comment on attachment 253384 [details] Patch Clearing flags on attachment: 253384 Committed r184567: <http://trac.webkit.org/changeset/184567>
WebKit Commit Bot
Comment 9 2015-05-19 09:37:26 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.


OSZAR »