Bug 7175 - CIFS VFS for Linux needs an extended attribute (xattr) for CreationTime
Summary: CIFS VFS for Linux needs an extended attribute (xattr) for CreationTime
Status: NEW
Alias: None
Product: CifsVFS
Classification: Unclassified
Component: kernel fs (show other bugs)
Version: 2.6
Hardware: All Linux
: P3 enhancement
Target Milestone: ---
Assignee: Steve French
QA Contact: cifs QA contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-24 17:12 UTC by George Powers (mail address dead)
Modified: 2020-07-16 00:12 UTC (History)
0 users

See Also:


Attachments
patch to return CIFS file creation time in extended attribute (3.19 KB, patch)
2010-03-08 10:59 UTC, George Powers (mail address dead)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description George Powers (mail address dead) 2010-02-24 17:12:09 UTC
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.
Comment 1 George Powers (mail address dead) 2010-03-08 10:59:19 UTC
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:

    {
        uint64_t crtime;
        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.