mirror of
https://github.com/versity/scoutfs.git
synced 2026-01-08 04:55:21 +00:00
Print the new inode data_version field
We've added a data_version field to the inode for tracking changes to the file's data. Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
@@ -200,6 +200,10 @@ struct scoutfs_timespec {
|
||||
} __packed;
|
||||
|
||||
/*
|
||||
* @data_version: incremented every time the contents of a file could
|
||||
* have changed. It is exposed via an ioctl and is then provided as an
|
||||
* argument to data functions to protect racing modification.
|
||||
*
|
||||
* XXX
|
||||
* - otime?
|
||||
* - compat flags?
|
||||
@@ -211,6 +215,7 @@ struct scoutfs_inode {
|
||||
__le64 size;
|
||||
__le64 blocks;
|
||||
__le64 link_counter;
|
||||
__le64 data_version;
|
||||
__le32 nlink;
|
||||
__le32 uid;
|
||||
__le32 gid;
|
||||
|
||||
@@ -61,7 +61,7 @@ static void print_inode(struct scoutfs_inode *inode)
|
||||
{
|
||||
printf(" inode: size: %llu blocks: %llu lctr: %llu nlink: %u\n"
|
||||
" uid: %u gid: %u mode: 0%o rdev: 0x%x\n"
|
||||
" salt: 0x%x\n"
|
||||
" salt: 0x%x data_version %llu\n"
|
||||
" atime: %llu.%08u ctime: %llu.%08u\n"
|
||||
" mtime: %llu.%08u\n",
|
||||
le64_to_cpu(inode->size), le64_to_cpu(inode->blocks),
|
||||
@@ -69,6 +69,7 @@ static void print_inode(struct scoutfs_inode *inode)
|
||||
le32_to_cpu(inode->nlink), le32_to_cpu(inode->uid),
|
||||
le32_to_cpu(inode->gid), le32_to_cpu(inode->mode),
|
||||
le32_to_cpu(inode->rdev), le32_to_cpu(inode->salt),
|
||||
le64_to_cpu(inode->data_version),
|
||||
le64_to_cpu(inode->atime.sec),
|
||||
le32_to_cpu(inode->atime.nsec),
|
||||
le64_to_cpu(inode->ctime.sec),
|
||||
|
||||
Reference in New Issue
Block a user