Page MenuHomeFreeBSD

ZFS: Allow setting file creation time
AbandonedPublic

Authored by asomers on May 4 2015, 11:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 22 2023, 5:40 PM
Unknown Object (File)
Dec 22 2023, 5:39 PM
Unknown Object (File)
Dec 20 2023, 12:44 AM
Unknown Object (File)
Nov 9 2023, 6:51 PM
Unknown Object (File)
Nov 4 2023, 3:43 AM
Unknown Object (File)
Oct 8 2023, 5:42 PM
Unknown Object (File)
Oct 4 2023, 4:38 AM
Unknown Object (File)
Oct 3 2023, 3:34 AM

Details

Reviewers
jilles
delphij
mahrens
pjd
mckusick
Group Reviewers
ZFS
Summary

Currently creation time (birth time) on ZFS is read-only which is
contrary to the manual page of futimes.

The proposed change adopts similar semantics as UFS2, where VFS is responsible
for doing sanity checks (permissions, birth time can not go forward, etc.) and
use that information to update SA_ZPL_CRTIME (=di_birthtime for UFS).

Test Plan

This code have been tested on -CURRENT but I would like to see comments,
especially if this is actually a desirable behavior and/or if it's Okay
to use the unused bit on Illumos for AT_CRTIME.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 7324

Event Timeline

delphij retitled this revision from to ZFS: Allow setting file creation time.
delphij updated this object.
delphij edited the test plan for this revision. (Show Details)
delphij added reviewers: ZFS, mahrens, mckusick, pjd, jilles.

The concept of allowing to set creation time looks good to me.

Adding AT_CRTIME may be wrong. Further down in sys/cddl/contrib/opensolaris/uts/common/sys/vnode.h, there is XAT_CREATETIME which should perhaps be used/extended instead.

I think that allowing the setting of creation time for ZFS is a sensible addition. Files coming off of archive media have good reason to set it.

asomers added a reviewer: delphij.
asomers added a subscriber: asomers.

I independently made the same change in D9353