aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.com>2016-04-01 16:14:28 -0400
committerDavid Sterba <dsterba@suse.com>2016-04-28 05:06:41 -0400
commit33ca913349962208e13e894ada99b9ae6e0080ee (patch)
tree67da8b2d4f15b8742f8df8a4baed01f6a86b8212 /include/uapi/linux
parent04cd01dffbf9be14ccc51595280c8dc8c318a9c9 (diff)
btrfs: uapi/linux/btrfs.h migration, move struct btrfs_ioctl_defrag_range_args
struct btrfs_ioctl_defrag_range_args is used by the BTRFS_IOC_DEFRAG_RANGE ioctl. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Reviewed-by: Liu Bo <bo.li.liu@oracle.com> Reviewed-by: Josef Bacik <jbacik@fb.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/btrfs.h38
1 files changed, 37 insertions, 1 deletions
diff --git a/include/uapi/linux/btrfs.h b/include/uapi/linux/btrfs.h
index abae362d4ec7..98aff38a70d3 100644
--- a/include/uapi/linux/btrfs.h
+++ b/include/uapi/linux/btrfs.h
@@ -474,9 +474,45 @@ struct btrfs_ioctl_clone_range_args {
474 __u64 dest_offset; 474 __u64 dest_offset;
475}; 475};
476 476
477/* flags for the defrag range ioctl */ 477/*
478 * flags definition for the defrag range ioctl
479 *
480 * Used by:
481 * struct btrfs_ioctl_defrag_range_args.flags
482 */
478#define BTRFS_DEFRAG_RANGE_COMPRESS 1 483#define BTRFS_DEFRAG_RANGE_COMPRESS 1
479#define BTRFS_DEFRAG_RANGE_START_IO 2 484#define BTRFS_DEFRAG_RANGE_START_IO 2
485struct btrfs_ioctl_defrag_range_args {
486 /* start of the defrag operation */
487 __u64 start;
488
489 /* number of bytes to defrag, use (u64)-1 to say all */
490 __u64 len;
491
492 /*
493 * flags for the operation, which can include turning
494 * on compression for this one defrag
495 */
496 __u64 flags;
497
498 /*
499 * any extent bigger than this will be considered
500 * already defragged. Use 0 to take the kernel default
501 * Use 1 to say every single extent must be rewritten
502 */
503 __u32 extent_thresh;
504
505 /*
506 * which compression method to use if turning on compression
507 * for this defrag operation. If unspecified, zlib will
508 * be used
509 */
510 __u32 compress_type;
511
512 /* spare for later */
513 __u32 unused[4];
514};
515
480 516
481#define BTRFS_SAME_DATA_DIFFERS 1 517#define BTRFS_SAME_DATA_DIFFERS 1
482/* For extent-same ioctl */ 518/* For extent-same ioctl */