Skip to content

Add support for birthtime #8508

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions module/zfs/zfs_vnops.c
Original file line number Diff line number Diff line change
Expand Up @@ -2641,6 +2641,7 @@ zfs_getattr_fast(struct inode *ip, struct kstat *sp)
zfsvfs_t *zfsvfs = ITOZSB(ip);
uint32_t blksize;
u_longlong_t nblocks;
uint64_t btime[2];

ZFS_ENTER(zfsvfs);
ZFS_VERIFY_ZP(zp);
Expand All @@ -2649,6 +2650,13 @@ zfs_getattr_fast(struct inode *ip, struct kstat *sp)

generic_fillattr(ip, sp);

#ifdef HAVE_PATH_IOPS_GETATTR
(void) sa_lookup(zp->z_sa_hdl, SA_ZPL_CRTIME(zfsvfs),
btime, sizeof (uint64_t) * 2);
ZFS_TIME_DECODE(&sp->btime, btime);
stat->result_mask |= STATX_BTIME;
#endif

sa_object_size(zp->z_sa_hdl, &blksize, &nblocks);
sp->blksize = blksize;
sp->blocks = nblocks;
Expand Down