st_ex_itime is an immutable original birth time aka instantiation time. Set when
a file is created, never changes thereafter. May not be set by the client.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
/* Is birthtime real, or was it calculated ? */
#define ST_EX_IFLAG_CALCULATED_BTIME (1 << 0)
+#define ST_EX_IFLAG_CALCULATED_ITIME (1 << 1)
/*
* Type for stat structure.
struct timespec st_ex_mtime;
struct timespec st_ex_ctime;
struct timespec st_ex_btime; /* birthtime */
+ /*
+ * Immutable original birth time aka instantiation time. Set when a file
+ * is created, never changes thereafter. May not be set by the client.
+ */
+ struct timespec st_ex_itime; /* instantiation time */
blksize_t st_ex_blksize;
blkcnt_t st_ex_blocks;
/* Version 41 - Remove SMB_VFS_BRL_CANCEL_WINDOWS */
/* Version 41 - Remove unused st_ex_mask from struct stat_ex */
/* Version 41 - convert struct stat_ex.st_ex_calculated_birthtime to flags */
+/* Version 41 - add st_ex_itime to struct stat_ex */
#define SMB_VFS_INTERFACE_VERSION 41
dst->st_ex_btime = calc_create_time_stat(pst);
dst->st_ex_iflags |= ST_EX_IFLAG_CALCULATED_BTIME;
}
+
+ dst->st_ex_itime = dst->st_ex_btime;
+ dst->st_ex_iflags |= ST_EX_IFLAG_CALCULATED_ITIME;
}
/****************************************************************************
dst->st_ex_btime = stx->stx_btime;
dst->st_ex_ctime = stx->stx_ctime;
dst->st_ex_mtime = stx->stx_mtime;
- dst->st_ex_iflags = 0;
+ dst->st_ex_itime = dst->st_ex_btime;
+ dst->st_ex_iflags = ST_EX_IFLAG_CALCULATED_ITIME;
dst->st_ex_blksize = stx->stx_blksize;
dst->st_ex_blocks = stx->stx_blocks;
}