scoutfs-utils: add committed_seq to statfs_more

Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
Zach Brown
2020-07-16 11:38:41 -07:00
committed by Zach Brown
parent f04a636229
commit 1e2dc6c1df
2 changed files with 9 additions and 0 deletions

View File

@@ -358,12 +358,17 @@ struct scoutfs_ioctl_search_xattrs {
* field is set if all of its bytes are within the valid_bytes that the
* kernel set on return.
*
* @committed_seq: All seqs up to and including this seq have been
* committed. Can be compared with meta_seq and data_seq from inodes in
* stat_more to discover if changes have been committed to disk.
*
* New fields are only added to the end of the struct.
*/
struct scoutfs_ioctl_statfs_more {
__u64 valid_bytes;
__u64 fsid;
__u64 rid;
__u64 committed_seq;
} __packed;
#define SCOUTFS_IOC_STATFS_MORE _IOR(SCOUTFS_IOCTL_MAGIC, 10, \

View File

@@ -67,6 +67,7 @@ static void print_inode_field(void *st, size_t off)
static struct stat_more_field fs_fields[] = {
FS_FIELD(fsid),
FS_FIELD(rid),
FS_FIELD(committed_seq),
{ NULL, }
};
@@ -81,6 +82,9 @@ static void print_fs_field(void *st, size_t off)
case FS_FIELD_OFF(rid):
printf("%016llx", sfm->rid);
break;
case FS_FIELD_OFF(committed_seq):
printf("%llu", sfm->committed_seq);
break;
};
}