summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>2020-07-13 21:28:59 +0900
committerDavid Sterba <dsterba@suse.com>2020-07-27 12:55:43 +0200
commit0fb408a558aadbaa58beb75b02c95741e1fbb514 (patch)
tree5b7905db872ade1c18b74170d69c22fe155ac7a6 /include
parent137c541821a83debb63b3fa8abdd1cbc41bdf3a1 (diff)
btrfs: add filesystem generation to FS_INFO ioctl
Add retrieval of the filesystem's generation to the fsinfo ioctl. This is driven by setting the BTRFS_FS_INFO_FLAG_GENERATION flag in btrfs_ioctl_fs_info_args::flags. Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'include')
-rw-r--r--include/uapi/linux/btrfs.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/uapi/linux/btrfs.h b/include/uapi/linux/btrfs.h
index 24f6848ad78e..9b82e01c191d 100644
--- a/include/uapi/linux/btrfs.h
+++ b/include/uapi/linux/btrfs.h
@@ -250,6 +250,9 @@ struct btrfs_ioctl_dev_info_args {
/* Request information about checksum type and size */
#define BTRFS_FS_INFO_FLAG_CSUM_INFO (1 << 0)
+/* Request information about filesystem generation */
+#define BTRFS_FS_INFO_FLAG_GENERATION (1 << 1)
+
struct btrfs_ioctl_fs_info_args {
__u64 max_id; /* out */
__u64 num_devices; /* out */
@@ -261,7 +264,8 @@ struct btrfs_ioctl_fs_info_args {
__u16 csum_type; /* out */
__u16 csum_size; /* out */
__u64 flags; /* in/out */
- __u8 reserved[968]; /* pad to 1k */
+ __u64 generation; /* out */
+ __u8 reserved[960]; /* pad to 1k */
};
/*