On Fri, Apr 01, 2016 at 02:34:58PM +0800, Qu Wenruo wrote:
> From: Wang Xiaoguang <wangxg.f...@cn.fujitsu.com>
> 
> Unlike in-memory or on-disk dedupe method, only SHA256 hash method is
> supported yet, so implement btrfs_dedupe_calc_hash() interface using
> SHA256.
> 
> Signed-off-by: Qu Wenruo <quwen...@cn.fujitsu.com>
> Signed-off-by: Wang Xiaoguang <wangxg.f...@cn.fujitsu.com>
> ---
>  fs/btrfs/dedupe.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 49 insertions(+)
> 
> diff --git a/fs/btrfs/dedupe.c b/fs/btrfs/dedupe.c
> index 9175a5f..bdaea3a 100644
> --- a/fs/btrfs/dedupe.c
> +++ b/fs/btrfs/dedupe.c
> @@ -593,3 +593,52 @@ int btrfs_dedupe_search(struct btrfs_fs_info *fs_info,
>       }
>       return ret;
>  }
> +
> +int btrfs_dedupe_calc_hash(struct btrfs_fs_info *fs_info,
> +                        struct inode *inode, u64 start,
> +                        struct btrfs_dedupe_hash *hash)
> +{
> +     int i;
> +     int ret;
> +     struct page *p;
> +     struct btrfs_dedupe_info *dedupe_info = fs_info->dedupe_info;
> +     struct crypto_shash *tfm = dedupe_info->dedupe_driver;
> +     struct {
> +             struct shash_desc desc;
> +             char ctx[crypto_shash_descsize(tfm)];
> +     } sdesc;

This construct has been obsoleted, please use SHASH_DESC_ON_STACK.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to