History

btrfs: sync some cleanups from progs into uapi/btrfs.h

When syncing this code into btrfs-progs Dave noticed there's some things we were losing in the sync that are needed. This syncs those changes into the kernel, which include a few comments that weren't in the kernel, some whitespace changes, an attribute, and the cplusplus bit.

Josef Bacik committed 3 years ago

Commit a2813531 parent 162d0531 file · +30 −6Browse files

Showing the changes to include/uapi (1 of 1 file). Show all

Unified · Split

include/uapi/linux/btrfs.h+30−6
@@ -19,8 +19,14 @@ · 18 unmodified lines
1919
2020 #ifndef _UAPI_LINUX_BTRFS_H
2121 #define _UAPI_LINUX_BTRFS_H
22+
23+#ifdef __cplusplus
24+extern "C" {
25+#endif
26+
2227 #include <linux/types.h>
2328 #include <linux/ioctl.h>
29+#include <linux/fs.h>
2430
2531 #define BTRFS_IOCTL_MAGIC 0x94
2632 #define BTRFS_VOL_NAME_MAX 255
@@ -333,6 +339,12 @@ struct btrfs_ioctl_feature_flags { · 306 unmodified lines
333339 */
334340 struct btrfs_balance_args {
335341 __u64 profiles;
342+
343+ /*
344+ * usage filter
345+ * BTRFS_BALANCE_ARGS_USAGE with a single value means '0..N'
346+ * BTRFS_BALANCE_ARGS_USAGE_RANGE - range syntax, min..max
347+ */
336348 union {
337349 __u64 usage;
338350 struct {
@@ -549,7 +561,7 @@ struct btrfs_ioctl_search_header { · 210 unmodified lines
549561 __u64 offset;
550562 __u32 type;
551563 __u32 len;
552−};
564+} __attribute__ ((__may_alias__));
553565
554566 #define BTRFS_SEARCH_ARGS_BUFSIZE (4096 - sizeof(struct btrfs_ioctl_search_key))
555567 /*
@@ -562,6 +574,10 @@ struct btrfs_ioctl_search_args { · 6 unmodified lines
562574 char buf[BTRFS_SEARCH_ARGS_BUFSIZE];
563575 };
564576
577+/*
578+ * Extended version of TREE_SEARCH ioctl that can return more than 4k of bytes.
579+ * The allocated size of the buffer is set in buf_size.
580+ */
565581 struct btrfs_ioctl_search_args_v2 {
566582 struct btrfs_ioctl_search_key key; /* in/out - search parameters */
567583 __u64 buf_size; /* in - size of buffer
@@ -570,10 +586,11 @@ struct btrfs_ioctl_search_args_v2 { · 2 unmodified lines
570586 __u64 buf[]; /* out - found items */
571587 };
572588
589+/* With a @src_length of zero, the range from @src_offset->EOF is cloned! */
573590 struct btrfs_ioctl_clone_range_args {
574− __s64 src_fd;
575− __u64 src_offset, src_length;
576− __u64 dest_offset;
591+ __s64 src_fd;
592+ __u64 src_offset, src_length;
593+ __u64 dest_offset;
577594 };
578595
579596 /*
@@ -677,8 +694,11 @@ struct btrfs_ioctl_logical_ino_args { · 97 unmodified lines
677694 /* struct btrfs_data_container *inodes; out */
678695 __u64 inodes;
679696 };
680−/* Return every ref to the extent, not just those containing logical block.
681− * Requires logical == extent bytenr. */
697+
698+/*
699+ * Return every ref to the extent, not just those containing logical block.
700+ * Requires logical == extent bytenr.
701+ */
682702 #define BTRFS_LOGICAL_INO_ARGS_IGNORE_OFFSET (1ULL << 0)
683703
684704 enum btrfs_dev_stat_values {
@@ -1144,4 +1164,8 @@ enum btrfs_err_code { · 459 unmodified lines
11441164 #define BTRFS_IOC_ENCODED_WRITE _IOW(BTRFS_IOCTL_MAGIC, 64, \
11451165 struct btrfs_ioctl_encoded_io_args)
11461166
1167+#ifdef __cplusplus
1168+}
1169+#endif
1170+
11471171 #endif /* _UAPI_LINUX_BTRFS_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t