Windows NTFS and some other file systems keep a file creation time attribute, and return it in CIFS responses in the CreationTime field. User programs on Linux need a way to obtain CreationTime from the CIFS VFS, and prior discussions have proposed an extended attribute named "user.crtime".
Steve French noted these concerns:
1) Samba uses a different (more complex) ndr encoding (in xattr) of birth time and dos attributes etc. and we wanted to discuss whether to keep.
2) Need to see how other Operating Systems return creation time (birth time) and/or how NFS or ext4 do this.
Created attachment 5470 [details]
patch to return CIFS file creation time in extended attribute
This patch for the CIFS VFS driver returns an extended attribute value for the CIFS CreationTime value. The xattr is named "user.crtime". The value is returned as a 64-bit UNIX time value (seconds since the epoch) in local CPU data order. Here's a usage example:
ssize_t sz = getxattr("/mnt/public/foo.txt", "user.crtime", &crtime, sizeof crtime);
This patch does not account for the broader issues raised by Steve French.