Re: [LSF/MM/BPF TOPIC] File system checksum offload

Kanchan Joshi
2025-02-03T13:27:26Z

On 2/3/2025 1:46 PM, Qu Wenruo wrote:
>> ell for the WAF part, it'll save us 32 Bytes per FS sector (typically
>> 4k) in the btrfs case, that's ~0.8% of the space.
>
> You forgot the csum tree COW part.
>
> Updating csum tree is pretty COW heavy and that's going to cause quite
> some wearing.
>
> Thus although I do not think the RFC patch makes much sense compared to
> just existing NODATASUM mount option, I'm interesting in the hardware
> csum handling.

But, patches do exactly that i.e., hardware cusm support. And posted
numbers [*] are also when hardware is checksumming the data blocks.

NODATASUM forgoes the data cums at Btrfs level, but its scope of
control/influence ends there, as it knows nothing about what happens
underneath.
Proposed option (DATASUM_OFFLOAD) ensures that the [only] hardware
checksums the data blocks.

[*]