btrfs: move struct btrfs_ioctl_defrag_range_args from ctree.h to linux/btrfs.h
PATCH 1/1 btrfs: move struct btrfs_ioctl_defrag_range_args from ctree.h to linux/btrfs.h
include/uapi/linux/btrfs.h is a more logical place to put the struct btrfs_ioctl_defrag_range_args as it is being used by the BTRFS_IOC_DEFRAG_RANGE IOCTL which is defined in that file. Additionally, this is where the btrfs-progs defines that struct. Thus this patches reduces the gap between the btrfs-progs headers and the kernel headers.
--- fs/btrfs/ctree.h | 31 ------------------------------- include/uapi/linux/btrfs.h | 31 +++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 31 deletions(-)
fs/btrfs/ctree.h +0 -31
@@ -1891,37 +1891,6 @@ struct btrfs_root {atomic_t will_be_snapshoted; }; -struct btrfs_ioctl_defrag_range_args { -/* start of the defrag operation */ -__u64 start; - -/* number of bytes to defrag, use (u64)-1 to say all */ -__u64 len; - -/* -* flags for the operation, which can include turning -* on compression for this one defrag -*/ -__u64 flags; - -/* -* any extent bigger than this will be considered -* already defragged. Use 0 to take the kernel default -* Use 1 to say every single extent must be rewritten -*/ -__u32 extent_thresh; - -/* -* which compression method to use if turning on compression -* for this defrag operation. If unspecified, zlib will -* be used -*/ -__u32 compress_type; - -/* spare for later */ -__u32 unused[4 ]; -}; -/* * inode items have the data typically returned from stat and store other
include/uapi/linux/btrfs.h +31 -0
@@ -350,6 +350,37 @@ struct btrfs_ioctl_same_args {struct btrfs_ioctl_same_extent_info info[0 ]; }; +struct btrfs_ioctl_defrag_range_args { +/* start of the defrag operation */ +__u64 start; + +/* number of bytes to defrag, use (u64)-1 to say all */ +__u64 len; + +/* +* flags for the operation, which can include turning +* on compression for this one defrag +*/ +__u64 flags; + +/* +* any extent bigger than this will be considered +* already defragged. Use 0 to take the kernel default +* Use 1 to say every single extent must be rewritten +*/ +__u32 extent_thresh; + +/* +* which compression method to use if turning on compression +* for this defrag operation. If unspecified, zlib will +* be used +*/ +__u32 compress_type; + +/* spare for later */ +__u32 unused[4 ]; +}; +struct btrfs_ioctl_space_info {__u64 flags;__u64 total_bytes;
Signature · 1 line
2.0.4
Quoted 8 lines · Marios Titas
include/uapi/linux/btrfs.his a more logical place to put the structbtrfs_ioctl_defrag_range_argsas it is being used by theBTRFS_IOC_DEFRAG_RANGEIOCTL which is defined in that file. Additionally, this is where the btrfs-progs defines that struct. Thus this patches reduces the gap between the btrfs-progs headers and the kernel headers.Signed-off-by Marios Titas <[email protected]>