Bug 1144891

Summary: RFE: stat calls do not return nanosecond timestamps
Product: [Community] Virtualization Tools Reporter: Richard W.M. Jones <rjones>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED RAWHIDE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: mbooth, ptoscano, rbalakri, virt-bugs, walters
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1144766 Environment:
Last Closed: 2014-09-22 17:29:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1144766    

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.