Re: [PATCH 2/5] btrfs: remove item_size member of struct btrfs_clone_extent_info

Josef Bacik
2020-09-10T20:54:47Z

On 9/8/20 6:27 AM, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
>
> The value of item_size of struct btrfs_clone_extent_info is always set to
> the size of a non-inline file extent item, and in fact the infratructure
> that uses this structure (btrfs_punch_hole_range()) does not work with
> inline file extents at all (and it is not supposed to).
>
> So just remove that field from the structure and use directly
> sizeof(struct btrfs_file_extent_item) instead. Also assert that the
> file extent type is not inline at btrfs_insert_clone_extent().
>
> Signed-off-by: Filipe Manana <fdmanana@suse.com>

Reviewed-by: Josef Bacik <josef@toxicpanda.com>

Thanks,

Josef