ext4 - getting at birth time (file create time) and getting/setting nanosecond time stamps and utime

Steve French smfrench at gmail.com
Mon Oct 19 11:17:23 MDT 2009


A new version of the format for Samba server related file system
extended attributes is expected in the next version of Samba so the
topic of create time and nanosecond timestamps for Linux has come up
again.  Since some file systems don't support storing create time
(birth time), and none support updating create time, or for that
matter for storing any nanosecond timestamps at all (a millisecond
seems like a much longer time today than when the stat structure was
defined), and dos attributes, Samba server stores these in extended
attributes, which is awkward on those file systems which store
(different) versions of these on disk.

In the absence of any syscalls for utimes (nanosecond granularity) and
no syscall for returning (or setting) create time (birth time), and
ext4 likely to become popular (ext4 stores nanosecond timestamps, and
create time), Samba developers (and probably other apps such as backup
applications) need a way to modify the inode's nanosecond timestamps
and get at file create time, perhaps via ioctl and/or xattr.

I think the chance of adding new syscalls for these and libc getting
modified for this is near zero, so any opinions about the best way for
Samba server to get at this information?

Mingming Cao wrote:
> 1)  Ext4 adds support for date-created timestamps. But, current stat()interface
> doesn't support the file creation time/delete time. As far as I know, it is hard
> to modify or add the necessary systemcall to export this info out to
> user programs for now. These changes would require coordination of many projects.
>2) from the linux man page utimes seems only allow to set microsecond timestamp


-- 
Thanks,

Steve


More information about the samba-technical mailing list