Skip to contentSkip to conversation

Creation time in XFS

DISCUSSION Martin Steigerwald 6 participants 8 messages Sep 30, 2007 – Oct 2, 2007

lore
Share & tools
lore
#1 lore raw
Quoted 11 lines · Martin Steigerwald

Hi!

Does XFS support creation time too or are there plans to support it?

Ext3 seems to do since 2.6.23:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ef7f38359ea8b3e9c7f2cae9a4d4935f55ca9e80

http://tinyurl.com/3drb65

Ciao,

Hi Martin,

No XFS does not support creation time. It just has the regular atime,mtime and ctime.
There are no plans that I've heard to support it.
Not much involved to support it AFAICT but it would either involve changing the ondisk format of the inode or storing it in an EA. Storing it in an EA would be yet another one for the EA creation on inode allocation scenarios (done presently for default ACLs and and also in other future data).

I wonder how this creation time is being exported currently?

--Tim

#2 lore raw
Quoted 5 lines · Timothy Shimmin

No XFS does not support creation time. It just has the regular atime,mtime and ctime.
There are no plans that I've heard to support it.
Not much involved to support it AFAICT but it would either involve changing the ondisk format of the inode or storing it in an EA.

If you ever change the on disk format adding a file type similar to ext3 to directories could also greatly speed up find in many cases.

Quoted 1 line

I wonder how this creation time is being exported currently?

I don't think it is at all currently:

% gid i_crtime
fs/udf/udf_i.h:21:#define UDF_I_CRTIME(X) ( UDF_I(X)->i_crtime )

include/linux/ext4_fs.h:344:    __le32  i_crtime;       /* File Creation time */
include/linux/ext4_fs_i.h:160:  struct timespec i_crtime;
include/linux/udf_fs_i.h:20:    struct timespec         i_crtime;
fs/ext4/ialloc.c:566:   inode->i_mtime = inode->i_atime = inode->i_ctime = ei->i_crtime =
fs/ext4/inode.c:2705:   EXT4_EINODE_GET_XTIME(i_crtime, ei, raw_inode);
fs/ext4/inode.c:2792:   EXT4_EINODE_SET_XTIME(i_crtime, ei, raw_inode);

-Andi

#3 lore raw
Quoted 11 lines · Andi Kleen
Quoted 5 lines · Timothy Shimmin

No XFS does not support creation time. It just has the regular atime,mtime and ctime.
There are no plans that I've heard to support it.
Not much involved to support it AFAICT but it would either involve changing the ondisk format of the inode or storing it in an EA.

If you ever change the on disk format adding a file type similar to ext3 to directories could also greatly speed up find in many cases.

Sounds a good idea.
In that case a new ondisk directory format (at v2 at the moment). I think Dave (dgc) might have been mentioning something about that recently.

--Tim

#4 lore raw
In reply to Andi Kleen
Quoted 10 lines · Andi Kleen
Quoted 5 lines · Timothy Shimmin

No XFS does not support creation time. It just has the regular atime,mtime and ctime.
There are no plans that I've heard to support it.
Not much involved to support it AFAICT but it would either involve changing the ondisk format of the inode or storing it in an EA.

If you ever change the on disk format adding a file type similar to ext3 to directories could also greatly speed up find in many cases.

Sure, but that's the directory structure, not inode structure. They have different versioning methods, and so can be modified independently.

FWIW, I haven't forgotten abou thtis request, Andi ;) I'll be modifying the directory structure for CRCs relatively soon, and I plan to do that modification at the same time so I only need a single version bump for both....

Quoted 3 lines
Quoted 1 line

I wonder how this creation time is being exported currently?

I don't think it is at all currently:

So what is the point? Forensic analysis?

Cheers,

Dave.

Signature · 3 lines
Dave Chinner
Principal Engineer
SGI Australian Software Group
#5 lore raw
Quoted 3 lines · David Chinner
Quoted 1 line

I don't think it is at all currently:

So what is the point? Forensic analysis?

Windows wants it, so I guess they added when they had to bump the inode version anyway in preparation of a user interface for samba. We probably should do the same for XFS when bumping the inode version for the crcs.

#6 lore raw
Quoted 7 lines · Christoph Hellwig
Quoted 3 lines · David Chinner
Quoted 1 line

I don't think it is at all currently:

So what is the point? Forensic analysis?

Windows wants it, so I guess they added when they had to bump the inode version anyway in preparation of a user interface for samba.

<groan>

Can you point me to whatever list this was discussed on? This is exactly the sort of stuff that needs to be discussed on -fsdevel.

Quoted 2 lines

We probably
should do the same for XFS when bumping the inode version for the crcs.

Perhaps. I don't really like the idea of adding unused fields to the on disk structure just in case it is needed in the future....

Cheers,

Dave.

Signature · 3 lines
Dave Chinner
Principal Engineer
SGI Australian Software Group