btrfs-progs
btrfs-progs copied to clipboard
Feature request: Implement a `verity` flag and per-subvol root hashes
It would be incredibly useful to have BTRFS support per-subvolume dm-verity style root hashes which can be used as a replacement for dm-verity, BTRFS already implements checksums for integrity (and fs-verity), however, there's no roothash option that can be specified like with dm-verity. Here's the proposal:
- Implement a
verityflag that can be toggled per-subvolume. When enabled,btrfs subvolume showwill display the subvol's root hash which is calculated periodically (or on write or some other trigger). - Require verity subvol's to be mounted with
mount -o subvol=veritysubvol,subvolhash=...similar to howroothashis needed for mounting verity partitions.
Related: https://github.com/kdave/btrfs-progs/issues/452#issue-1169868223