On 2/10/21 5:08 PM, Josef Bacik wrote:
On 2/1/21 4:28 PM, Goffredo Baroncelli wrote:
From: Goffredo Baroncelli <kreij...@inwind.it>
This ioctl is a base for returning / setting information from / to the
fields of the btrfs_dev_item object.
For now only the "type" field is returned / set.
Signed-off-by: Goffredo Baroncelli <kreij...@inwind.it>
[...]
+ /* it is possible to set only BTRFS_DEV_PROPERTY_TYPE for now */
+ if (dev_props.properties & ~(BTRFS_DEV_PROPERTY_TYPE))
+ return -EPERM;
+
+ trans = btrfs_start_transaction(root, 0);
This needs to be 1, we're updating an item.
Ok
[...]
+ * Up to 2020/05/11 the only properties that can be read/write is the 'type'
+ * one.
+ */
+struct btrfs_ioctl_dev_properties {
+ __u64 devid;
+ __u64 properties;
+ __u64 type;
+ __u32 dev_group;
+ __u8 seek_speed;
+ __u8 bandwidth;
+
+ /*
+ * for future expansion
+ */
+ __u8 unused1[2];
+ __u64 unused2[4];
+};
+
I think we're padding out to 1k for new stuff like this? We can never have too
much room for expansion. Thanks,
Ok, in the next iteration this will be expanded up to 1kB
Josef
Ciao
Goffredo
--
gpg @keyserver.linux.it: Goffredo Baroncelli <kreijackATinwind.it>
Key fingerprint BBF5 1610 0B64 DAC6 5F7D 17B2 0EDA 9B37 8B82 E0B5