Re: [PATCH 42/63] xfs: add dedupe range vfs function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> +/* extent-same (dedupe) ioctls; these MUST match the btrfs ioctl definitions */
> +#define XFS_EXTENT_DATA_SAME	0
> +#define XFS_EXTENT_DATA_DIFFERS	1
> +
> +/* from struct btrfs_ioctl_file_extent_same_info */
> +struct xfs_extent_data_info {
> +	__s64 fd;		/* in - destination file */
> +	__u64 logical_offset;	/* in - start of extent in destination */
> +	__u64 bytes_deduped;	/* out - total # of bytes we were able
> +				 * to dedupe from this file */
> +	/* status of this dedupe operation:
> +	 * < 0 for error
> +	 * == XFS_EXTENT_DATA_SAME if dedupe succeeds
> +	 * == XFS_EXTENT_DATA_DIFFERS if data differs
> +	 */
> +	__s32 status;		/* out - see above description */
> +	__u32 reserved;
> +};
> +
> +/* from struct btrfs_ioctl_file_extent_same_args */
> +struct xfs_extent_data {
> +	__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 xfs_extent_data_info info[0];
> +};
> +
>  #define XFS_IOC_CLONE		 _IOW (0x94, 9, int)
>  #define XFS_IOC_CLONE_RANGE	 _IOW (0x94, 13, struct xfs_clone_args)
> +#define XFS_IOC_FILE_EXTENT_SAME _IOWR(0x94, 54, struct xfs_extent_data)

Same as with the last patch: we use VFS defintions for these, no need
to add duplicate and unused XFS versions.

--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux