st_ex_file_id is an immutable, never reused numeric identifier for objects in a
filesystem.
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)
+#define ST_EX_IFLAG_CALCULATED_FILE_ID (1 << 2)
/*
* Type for stat structure.
struct stat_ex {
dev_t st_ex_dev;
ino_t st_ex_ino;
+ uint64_t st_ex_file_id;
mode_t st_ex_mode;
nlink_t st_ex_nlink;
uid_t st_ex_uid;
/* 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 */
+/* Version 41 - add st_ex_file_id to struct stat_ex */
#define SMB_VFS_INTERFACE_VERSION 41
#else
dst->st_ex_flags = 0;
#endif
+ dst->st_ex_file_id = dst->st_ex_ino;
+ dst->st_ex_iflags |= ST_EX_IFLAG_CALCULATED_FILE_ID;
}
/*******************************************************************
dst->st_ex_iflags = ST_EX_IFLAG_CALCULATED_ITIME;
dst->st_ex_blksize = stx->stx_blksize;
dst->st_ex_blocks = stx->stx_blocks;
+ dst->st_ex_file_id = dst->st_ex_ino;
+ dst->st_ex_iflags |= ST_EX_IFLAG_CALCULATED_FILE_ID;
}
static int cephwrap_stat(struct vfs_handle_struct *handle,