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.
Showing the changes to include/uapi (1 of 1 file). Show all
Unified · Split
| @@ -19,8 +19,14 @@ · 18 unmodified lines | ||
| 19 | 19 | |
| 20 | 20 | #ifndef _UAPI_LINUX_BTRFS_H |
| 21 | 21 | #define _UAPI_LINUX_BTRFS_H |
| 22 | + | |
| 23 | +#ifdef __cplusplus | |
| 24 | +extern "C" { | |
| 25 | +#endif | |
| 26 | + | |
| 22 | 27 | #include <linux/types.h> |
| 23 | 28 | #include <linux/ioctl.h> |
| 29 | +#include <linux/fs.h> | |
| 24 | 30 | |
| 25 | 31 | #define BTRFS_IOCTL_MAGIC 0x94 |
| 26 | 32 | #define BTRFS_VOL_NAME_MAX 255 |
| @@ -333,6 +339,12 @@ struct btrfs_ioctl_feature_flags { · 306 unmodified lines | ||
| 333 | 339 | */ |
| 334 | 340 | struct btrfs_balance_args { |
| 335 | 341 | __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 | + */ | |
| 336 | 348 | union { |
| 337 | 349 | __u64 usage; |
| 338 | 350 | struct { |
| @@ -549,7 +561,7 @@ struct btrfs_ioctl_search_header { · 210 unmodified lines | ||
| 549 | 561 | __u64 offset; |
| 550 | 562 | __u32 type; |
| 551 | 563 | __u32 len; |
| 552 | −}; | |
| 564 | +} __attribute__ ((__may_alias__)); | |
| 553 | 565 | |
| 554 | 566 | #define BTRFS_SEARCH_ARGS_BUFSIZE (4096 - sizeof(struct btrfs_ioctl_search_key)) |
| 555 | 567 | /* |
| @@ -562,6 +574,10 @@ struct btrfs_ioctl_search_args { · 6 unmodified lines | ||
| 562 | 574 | char buf[BTRFS_SEARCH_ARGS_BUFSIZE]; |
| 563 | 575 | }; |
| 564 | 576 | |
| 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 | + */ | |
| 565 | 581 | struct btrfs_ioctl_search_args_v2 { |
| 566 | 582 | struct btrfs_ioctl_search_key key; /* in/out - search parameters */ |
| 567 | 583 | __u64 buf_size; /* in - size of buffer |
| @@ -570,10 +586,11 @@ struct btrfs_ioctl_search_args_v2 { · 2 unmodified lines | ||
| 570 | 586 | __u64 buf[]; /* out - found items */ |
| 571 | 587 | }; |
| 572 | 588 | |
| 589 | +/* With a @src_length of zero, the range from @src_offset->EOF is cloned! */ | |
| 573 | 590 | 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; | |
| 577 | 594 | }; |
| 578 | 595 | |
| 579 | 596 | /* |
| @@ -677,8 +694,11 @@ struct btrfs_ioctl_logical_ino_args { · 97 unmodified lines | ||
| 677 | 694 | /* struct btrfs_data_container *inodes; out */ |
| 678 | 695 | __u64 inodes; |
| 679 | 696 | }; |
| 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 | + */ | |
| 682 | 702 | #define BTRFS_LOGICAL_INO_ARGS_IGNORE_OFFSET (1ULL << 0) |
| 683 | 703 | |
| 684 | 704 | enum btrfs_dev_stat_values { |
| @@ -1144,4 +1164,8 @@ enum btrfs_err_code { · 459 unmodified lines | ||
| 1144 | 1164 | #define BTRFS_IOC_ENCODED_WRITE _IOW(BTRFS_IOCTL_MAGIC, 64, \ |
| 1145 | 1165 | struct btrfs_ioctl_encoded_io_args) |
| 1146 | 1166 | |
| 1167 | +#ifdef __cplusplus | |
| 1168 | +} | |
| 1169 | +#endif | |
| 1170 | + | |
| 1147 | 1171 | #endif /* _UAPI_LINUX_BTRFS_H */ |