Bug 381367 - Populate UDS_CREATION_TIME on Linux when the statx() system call is available
Summary: Populate UDS_CREATION_TIME on Linux when the statx() system call is available
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: David Faure
URL:
Keywords: usability
: 389893 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-06-18 14:46 UTC by Nate Graham
Modified: 2019-04-13 13:37 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.58


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2017-06-18 14:46:37 UTC
Linux Kernel 4.11 has the statx() system call, which among other things reports files' creation times. This supports the much-requested feature to add file creation files to Dolphin's file info display and columns (https://bugs.kde.org/show_bug.cgi?id=286689).

Preliminary support in DOlphin is getting done now, and it currently works for FreeBSD with the UFS and ZFS file systems: https://phabricator.kde.org/D5138

It would be great to integrate Linux support by adding some code to populate UDS_CREATION_TIME if the filesystem is EXT4 and the kernel has the statx() system call available.
Comment 1 Nate Graham 2017-08-20 20:31:48 UTC
No real need for this separate bug; duplicate of https://bugs.kde.org/show_bug.cgi?id=286689

*** This bug has been marked as a duplicate of bug 286689 ***
Comment 2 Nate Graham 2017-08-27 18:08:54 UTC
Re-opening since the duped bug has been closed as fixed, and anyway, my patch to implement the functionality in Linux (https://phabricator.kde.org/D7423) really belongs in this bug.
Comment 3 Nate Graham 2018-03-29 21:43:49 UTC
*** Bug 389893 has been marked as a duplicate of this bug. ***
Comment 4 Nate Graham 2018-08-21 19:14:26 UTC
*** Bug 397398 has been marked as a duplicate of this bug. ***
Comment 5 Méven Car 2019-04-09 10:01:24 UTC
A patch is underway https://phabricator.kde.org/D20096
Comment 6 Nate Graham 2019-04-10 20:19:28 UTC
Thanks so much, Méven!
Comment 7 Méven Car 2019-04-13 13:30:50 UTC
Git commit f3b0f220a78d4e5a5b94b46e931779d755ac19ce by Méven Car.
Committed on 13/04/2019 at 13:30.
Pushed by meven into branch 'master'.

Fill UDSEntry::UDS_CREATION_TIME under linux when glibc >= 2.28

Summary:
The birthtime can be retrieved using using the statx function, available since glibc 2.28. In case the kernel lacks support for the underlying syscall, glibc falls back to stat internally. The validity of the btime field is indicated in the mask field, e.g. when the kernel or the filesystem lacks support for btime.
For details, see http://man7.org/linux/man-pages/man2/statx.2.html

In dolphin, the creation time column is now filled in linux :
{F6736022}
FIXED-IN: 5.58

Test Plan:
Tested using kioslavetest and local build of dolphin.
Tested without HAVE_STATX under linux.

Reviewers: #frameworks, dfaure, fvogt, bruns, broulik

Reviewed By: fvogt, bruns

Subscribers: anthonyfieroni, pino, bcooksley, ngraham, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D20096

M  +18   -0    src/ioslaves/file/ConfigureChecks.cmake
M  +3    -0    src/ioslaves/file/config-kioslave-file.h.cmake
M  +92   -24   src/ioslaves/file/file.cpp
M  +17   -0    tests/kioslavetest.cpp

https://commits.kde.org/kio/f3b0f220a78d4e5a5b94b46e931779d755ac19ce
Comment 8 Nate Graham 2019-04-13 13:37:02 UTC
<3