On 13 May 2019, at 3:17, Johannes Thumshirn wrote:

> On Fri, May 10, 2019 at 01:54:30PM +0000, Chris Mason wrote:
>> Looking at the callers of btrfs_csum_final() and btrfs_csum_data(), 
>> lets
>> just pass the shash_desc from the callers.  That way you don't have 
>> to
>> poke at memcpy and shash_desc_ctx().
>
> I wanted to avoid spreading knowledge about the crypto api to deep 
> into the
> filesystem. I'd actually loved to have something akin to ubifs'
> ubifs_info::log_hash but wasn't really sure how to handle concurrency.

It's much better to be explicit that we're using the crypto API than to 
muck around in crypto api internal data structs.  It's just a few 
callers, and not major surgery to change it around some time later if we 
need to.

-chris

Reply via email to