[PATCH v2] xfsrestore: use utimensat() to provide atime/mtime with ns resolution

Christoph Hellwig hch at infradead.org
Sat Sep 13 14:47:13 CDT 2014


On Thu, Sep 04, 2014 at 05:42:19PM -0400, Brian Foster wrote:
> xfsdump encodes and stores the full atime and mtime for each file with
> nanosecond resolution. xfsrestore uses utime() to set the times of each
> file that is restored. The latter supports resolution of 1 second, thus
> sub-second timestamp data is lost on restore.
> 
> Add the associated configure checks for and use utimensat() when
> available to restore timestamps with nanosecond resolution. Create a new
> helper to facilitate conditional support for utimensat().
> 
> Signed-off-by: Brian Foster <bfoster at redhat.com>

Looks good to me,

Reviewed-by: Christoph Hellwig <hch at lst.de>



More information about the xfs mailing list