* [PATCH v2] btrfs-progs: sync ioctl from kernel
@ 2023-03-18 0:07 Qu Wenruo
2023-03-18 12:11 ` Anand Jain
2023-03-21 1:58 ` David Sterba
0 siblings, 2 replies; 3+ messages in thread
From: Qu Wenruo @ 2023-03-18 0:07 UTC (permalink / raw)
To: linux-btrfs
This sync is mostly for the new member, btrfs_ioctl_dev_info_args::fsid.
Signed-off-by: Qu Wenruo <wqu@suse.com>
---
Changelog:
v2:
- Separate from the btrfs/249 fix
The btrfs/249 fallback fix is a little too niche, and the proper fix is
already merged
- Only sync to "include/ioctl.h" and "libbtrfsutil/btrfs.h"
---
include/ioctl.h | 13 ++++++++++++-
libbtrfsutil/btrfs.h | 13 ++++++++++++-
2 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/include/ioctl.h b/include/ioctl.h
index 1af16db13241..d8a8bb9cad3d 100644
--- a/include/ioctl.h
+++ b/include/ioctl.h
@@ -214,7 +214,18 @@ struct btrfs_ioctl_dev_info_args {
__u8 uuid[BTRFS_UUID_SIZE]; /* in/out */
__u64 bytes_used; /* out */
__u64 total_bytes; /* out */
- __u64 unused[379]; /* pad to 4k */
+ /*
+ * Optional, out.
+ *
+ * Showing the fsid of the device, allowing user space
+ * to check if this device is a seed one.
+ *
+ * Introduced in v6.3, thus user space still needs to
+ * check if kernel changed this value.
+ * Older kernel will not touch the values here.
+ */
+ __u8 fsid[BTRFS_UUID_SIZE];
+ __u64 unused[377]; /* pad to 4k */
__u8 path[BTRFS_DEVICE_PATH_NAME_MAX]; /* out */
};
BUILD_ASSERT(sizeof(struct btrfs_ioctl_dev_info_args) == 4096);
diff --git a/libbtrfsutil/btrfs.h b/libbtrfsutil/btrfs.h
index 0d863d58ec23..d9415ea2faed 100644
--- a/libbtrfsutil/btrfs.h
+++ b/libbtrfsutil/btrfs.h
@@ -224,7 +224,18 @@ struct btrfs_ioctl_dev_info_args {
__u8 uuid[BTRFS_UUID_SIZE]; /* in/out */
__u64 bytes_used; /* out */
__u64 total_bytes; /* out */
- __u64 unused[379]; /* pad to 4k */
+ /*
+ * Optional, out.
+ *
+ * Showing the fsid of the device, allowing user space
+ * to check if this device is a seed one.
+ *
+ * Introduced in v6.3, thus user space still needs to
+ * check if kernel changed this value.
+ * Older kernel will not touch the values here.
+ */
+ __u8 fsid[BTRFS_UUID_SIZE];
+ __u64 unused[377]; /* pad to 4k */
__u8 path[BTRFS_DEVICE_PATH_NAME_MAX]; /* out */
};
--
2.39.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] btrfs-progs: sync ioctl from kernel
2023-03-18 0:07 [PATCH v2] btrfs-progs: sync ioctl from kernel Qu Wenruo
@ 2023-03-18 12:11 ` Anand Jain
2023-03-21 1:58 ` David Sterba
1 sibling, 0 replies; 3+ messages in thread
From: Anand Jain @ 2023-03-18 12:11 UTC (permalink / raw)
To: Qu Wenruo, linux-btrfs
On 3/18/23 08:07, Qu Wenruo wrote:
> This sync is mostly for the new member, btrfs_ioctl_dev_info_args::fsid.
>
> Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] btrfs-progs: sync ioctl from kernel
2023-03-18 0:07 [PATCH v2] btrfs-progs: sync ioctl from kernel Qu Wenruo
2023-03-18 12:11 ` Anand Jain
@ 2023-03-21 1:58 ` David Sterba
1 sibling, 0 replies; 3+ messages in thread
From: David Sterba @ 2023-03-21 1:58 UTC (permalink / raw)
To: Qu Wenruo; +Cc: linux-btrfs
On Sat, Mar 18, 2023 at 08:07:50AM +0800, Qu Wenruo wrote:
> This sync is mostly for the new member, btrfs_ioctl_dev_info_args::fsid.
>
> Signed-off-by: Qu Wenruo <wqu@suse.com>
Added to devel, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-03-21 2:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-18 0:07 [PATCH v2] btrfs-progs: sync ioctl from kernel Qu Wenruo
2023-03-18 12:11 ` Anand Jain
2023-03-21 1:58 ` David Sterba
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.