[PATCH] Ext4: Make file creation time, i_version and i_generation available by xattrs

Steve French smfrench at gmail.com
Mon Jun 28 10:33:10 MDT 2010


On Mon, Jun 28, 2010 at 11:26 AM, David Howells <dhowells at redhat.com> wrote:
> Make the file creation time, inode data version number and inode generation
> number available on Ext4 by as xattrs named:
>
>        file.crtime
>        file.i_generation
>        file.i_version (directories only for ext4)
>
> This could then be used by Samba as the SMB protocol passes the file creation
> time to the client.
>
> With this patch, you can see the xattrs providing binary data:
>
> [root at andromeda ~]# getfattr -d /var/cache/fscache -e hex -m\.*
> getfattr: Removing leading '/' from absolute path names
> # file: var/cache/fscache
> file.crtime=0x53ba244c000000000000000000000000
> file.i_generation=0x0000000000000000
> file.i_version=0x0400000000000000

It would be easy enough to do something similar for crtime for cifs
(it may also be possible to do something similar to
i_generation and i_version at least for smb2 but haven't
experimented to see which servers could return something
similar to version and generation).  I did have a request for
someone doing a backup application over cifs to return creation
time so at least this would make sense.


-- 
Thanks,

Steve


More information about the samba-technical mailing list