Skip to content

lambutter 0.5.0

Latest

Choose a tag to compare

@glamberson glamberson released this 15 Oct 23:50

lambutter 0.5.0 fixes reads on btrfs filesystems that span more than one device and refuses fscrypt-encrypted data and names instead of returning them. It's a minor release because it adds two error tokens; no type changed shape.

Fixed

  • Multi-device filesystems were read from the wrong device. A chunk's first stripe was used whatever device it named, so on a filesystem across two devices lambutter read the device it was given at the other device's offsets. Metadata checksums caught that for tree blocks; file data came back wrong with no error. Each chunk is now read from its copy on the device being read (the superblock's dev_item.devid), and a chunk with no copy there is refused as UnsupportedProfile("prof_other_device"). A RAID1 filesystem reads from either member.
  • fscrypt markers were ignored. btrfs fscrypt isn't in mainline Linux, but its on-disk markers are defined: An extent with a non-zero encryption byte holds ciphertext and was returned as file data, and a directory entry with BTRFS_FT_ENCRYPTED has an encrypted name. Both are refused as UnsupportedFeature("feat_encryption").

Added

  • Error tokens prof_other_device and feat_encryption.
  • Fixtures for RAID1 across two devices with copies at different offsets, single data across two devices, and fscrypt markers. All three fail on 0.4.0.

Full changelog: CHANGELOG.md