3 ms·
Question for ZFS experts: the docs say ([1]) that I can change the checksum used, and I want to change it to BLAKE3. However, based on [2], it seems the checks
by gavinhoward 3y ago
Question for ZFS experts: the docs say ([1]) that I can change the checksum used, and I want to change it to BLAKE3.
However, based on [2], it seems the checksum doesn't store the type of checksum, so it seems that it's an all-or-nothing thing instead of a setting that only applies to new blocks.
Can I actually change the checksum? What happens when I do?
Edit: It appears the type of checksum actually is stored per-block, in `blk_prop` ([3]) of `blkptr_t` ([4]).
Edit 2: The manpage says that the change only applies to new data, so yes, it's safe.
[1]: https://openzfs.github.io/openzfs-docs/Basic%20Concepts/Checksums.html https://openzfs.github.io/openzfs-docs/Basic%20Concepts/Chec...
[2]: https://people.freebsd.org/~gibbs/zfs_doxygenation/html/d9/dce/structzio__cksum.html https://people.freebsd.org/~gibbs/zfs_doxygenation/html/d9/d...
[3]: https://github.com/openzfs/zfs/blob/c0e58995e33479a9c1d97fb2a19f8f507cc954b7/include/sys/spa.h#L442-L448 https://github.com/openzfs/zfs/blob/c0e58995e33479a9c1d97fb2...
[4]: https://github.com/openzfs/zfs/blob/c0e58995e33479a9c1d97fb2a19f8f507cc954b7/include/sys/spa.h#L375-L383 https://github.com/openzfs/zfs/blob/c0e58995e33479a9c1d97fb2...
- throw0101b 3y agoThe checksum type for the block is defined elsewhere (include/sys/zio.h) per a "enum zio_checksum".
- GrilledChips 3y agoIt would go against a fundamental principle of ZFS' design for changing a setting like that mid-flight to not be safe.