Bug 1144891 - RFE: stat calls do not return nanosecond timestamps
Summary: RFE: stat calls do not return nanosecond timestamps
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1144766
TreeView+ depends on / blocked
 
Reported: 2014-09-21 21:29 UTC by Richard W.M. Jones
Modified: 2014-09-22 17:29 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1144766
Environment:
Last Closed: 2014-09-22 17:29:46 UTC
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2014-09-21 21:29:02 UTC
Linux stat(2) and friends return more fields than the
ones described in the manual page.  The "hidden" fields
are:

    struct timespec st_atim;            /* Time of last access.  */
    struct timespec st_mtim;            /* Time of last modification.  */
    struct timespec st_ctim;            /* Time of last status change.  */

with the following macros defined for backwards compatibility:

# define st_atime st_atim.tv_sec
# define st_mtime st_mtim.tv_sec
# define st_ctime st_ctim.tv_sec

The guestfs_stat, guestfs_lstat and guestfs_lstatlist calls
do not allow us to return these fields.

This also means that guestmount (ie. FUSE) cannot show nanosecond
timestamps.

Comment 1 Richard W.M. Jones 2014-09-22 12:49:04 UTC
Patch posted:
https://www.redhat.com/archives/libguestfs/2014-September/msg00162.html

Comment 2 Richard W.M. Jones 2014-09-22 17:29:46 UTC
Now upstream:

https://github.com/libguestfs/libguestfs/commit/8664337cc39c8575ccb60abb8c6e30f92828ea51

Will be in Rawhide in 1.27.51.


Note You need to log in before you can comment on or make changes to this bug.