chiark / gitweb /
xattr-util: use crtime/btime if statx() is available for implementation of fd_setcrti...
authorLennart Poettering <lennart@poettering.net>
Tue, 20 Feb 2018 11:48:33 +0000 (12:48 +0100)
committerSven Eden <yamakuzure@gmx.net>
Wed, 30 May 2018 05:59:00 +0000 (07:59 +0200)
commitdfa4d304232d841d119f9f5a2a6f9ff8399f16ef
tree22db6faaa33fdca901d872a30b0bb7d275e3a37b
parent4c5943104751a678b7ad886131806dd964618d2f
xattr-util: use crtime/btime if statx() is available for implementation of fd_setcrtime() and friends

The Linux kernel exposes the birth time now for files through statx()
hence make use of it where available. We keep the xattr logic in place
for this however, since only a subset of file systems on Linux currently
expose the birth time. NFS and tmpfs for example do not support it. OTOH
there are other file systems that do support the birth time but might
not support xattrs (smb…), hence make the best of the two, in particular
in order to deal with journal files copied between file system types and
to maintain compatibility with older file systems that are updated to
newer version of the file system.
meson.build
src/basic/missing.h
src/basic/missing_syscall.h
src/basic/xattr-util.c