search for: btrfs_ioctl_same_extent_info

Displaying 2 results from an estimated 2 matches for "btrfs_ioctl_same_extent_info".

2013 Jun 26
6
[PROGS PATCH] Import btrfs-extent-same
...t; +#include <errno.h> +#include <string.h> +#include <sys/ioctl.h> + +#define BTRFS_IOCTL_MAGIC 0x94 + +#define BTRFS_IOC_FILE_EXTENT_SAME _IOWR(BTRFS_IOCTL_MAGIC, 54, \ + struct btrfs_ioctl_same_args) + +#define BTRFS_SAME_DATA_DIFFERS 1 +/* For extent-same ioctl */ +struct btrfs_ioctl_same_extent_info { + int64_t fd; /* in - destination file */ + uint64_t logical_offset; /* in - start of extent in destination */ + uint64_t bytes_deduped; /* out - total # of bytes we + * were able to dedupe from + * this file */ + /* status of this dedupe operation: + * 0 if dedup succeeds + * <...
2013 Aug 06
6
[PATCH 0/4] btrfs: out-of-band (aka offline) dedupe v4
...the locking has been updated. The ioctl accepts a struct: struct btrfs_ioctl_same_args { __u64 logical_offset; /* in - start of extent in source */ __u64 length; /* in - length of extent */ __u16 dest_count; /* in - total elements in info array */ __u16 reserved1; __u32 reserved2; struct btrfs_ioctl_same_extent_info info[0]; }; Userspace puts each duplicate extent (other than the source) in an item in the info array. As there can be multiple dedupes in one operation, each info item has it''s own status and ''bytes_deduped'' member. This provides a number of benefits: - We don''...