Handing filesystems which do not support some timestamp fields in |FILE_BASIC_INFO| and Microsoft NFSv3 driver "NfsV3Attributes" EA ...

Corinna Vinschen corinna-cygwin@cygwin.com
Wed Jan 22 17:16:41 GMT 2025


On Jan 22 00:37, Roland Mainz via Cygwin wrote:
> Hi!
> 
> ----
> 
> If a Windows filesystem does not support a type of timestamp it sets
> the matching timestamp field in |FILE_BASIC_INFO| to |0LL| (e.g. see
> Windows-driver-samples/filesys/cdfs/fileinfo.c:
> |Buffer->LastAccessTime.QuadPart = 0| ; typically this can affect
> |FILE_BASIC_INFO.CreationTime| and/or
> |FILE_BASIC_INFO.LastAccessTime|, but formally any combination of
> timestamp fields can be unsupported(==|0LL|)), and the Microsoft NFSv3
> driver sets the matching
> |nfs_timestruc_t.tv_sec|+|nfs_timestruc_t.tv_nsec| to a negative value
> (traditional UNIX uses -1, see
> https://github.com/gagern/gnulib/blob/master/lib/stat-time.h#L173 -
> and this value is then propagated via NFS), but I can't find a place
> in Cygwin where this is explicitly handled - is this missing, or is
> this code handling this somehow implicitly ?

Implicitely...
https://sourceware.org/cgit/newlib-cygwin/tree/winsup/cygwin/times.cc#n293

...except for ChangeTime:
https://sourceware.org/cgit/newlib-cygwin/tree/winsup/cygwin/fhandler/disk_file.cc#n406


Corinna


More information about the Cygwin mailing list