I’m pleased to share key Btrfs enhancements and fixes in UEK 8 (v6.12), offering customers the option to upgrade. These improvements enhance performance, functionality, and overall stability.

Btrfs Changes from 5.16 to 6.12

Key Highlights

  • Send/receive support for compressed data without transformation
  • New block group tree reduces mount time on large filesystems
  • Simplified quota accounting for better efficiency
  • Temporary FSID support enables mounting cloned devices
  • Optimized NOCOW writes improve throughput by ~9% in some configurations
  • discard=async is now the default for compatible devices
  • New rescue options:
    • ignoresuperflags and ignoremetacsums allow mounting by bypassing invalid superblock flags and metadata checksum failures
  • Paused balance and send tasks can now run in parallel
  • Devices can be added during a paused balance

Full List

Ioctl

  • DEV_INFO ioctl now exports per-device FSID, aiding seed/sprout setups.
  • FSTRIM ioctl updates the processed range even after errors or interruptions.
  • SYNC ioctl wakes the cleaner thread, speeding up the deletion of subvolumes.

Send-Receive

  • New protocol v2 allows for writing large data chunks.
  • Encoded extents can be sent and received as-is, without transformation.
  • Reduced stream size and optimized utimes for directory caches, offering significant speed improvements (up to 10x).

Subvolume

  • Cross-mount reflinks now work across separate mounts of the same subvolume.

Syslog

  • Messages now include a single-letter tag (e.g., “state: X”).

Tree-checker

  • Verifies transaction IDs during writes.
  • Verifies metadata tree block ownership with its tree root owner.
  • Automatically repairs device number mismatches.

Sub-page

  • Supports data sector sizes up to and including the page size.

Sysfs

  • Adds a tunable for block group background reclaim threshold: /sys/fs/btrfs/FSID/allocation/PROFILE/bg_reclaim_threshold
  • Exports commit stats: /sys/fs/btrfs/FSID/commit_stats
  • Exports chunk sizes: /sys/fs/btrfs/FSID/allocation/PROFILE/chunk_size
  • Exports discard tunable and stats: /sys/fs/btrfs/FSID/discard
  • Exports qgroup additional stats: /sys/fs/btrfs/FSID/qgroups
  • In sysfs throttling for asynchronous discard, setting the value to 0 in /sys/fs/btrfs/FSID/discard/iops_limit disables throttling, and the default IOPS limit increased from 100 to 1000.

Block-group

  • Reduces fragmentation by using allocation size class heuristics (e.g., 128k, 8M), assuming file size and lifespan correlation.
  • Exports the number of used allocation classes per block group type: /sys/fs/btrfs/FSID/allocation/*/size_classes
  • Introduces a new block group tree, significantly improving mount times.
  • New dynamic_reclaim sysfs knob for heuristic-based spare working space allocation.
  • Exports reclaim_* stats per block group type in sysfs.

Defragmentation

  • Can convert inline files to regular files.

Scrub

  • Scrub now repairs the superblock immediately, rather than waiting for the next transaction.

Super-block

  • Checks that the superblock is unchanged at thaw time, detecting accidental changes by other OSes.

Discard

  • -o discard=async is now enabled by default for devices that support trim/discard, applying asynchronous discard for the whole filesystem.

Simple Quota

  • Simplified quota accounting.

Temporary FSID

  • Allows mounting cloned devices; the filesystem gets a new, randomly generated UUID on mount.

Supports New Mount API

  • Uses the new mount API.

Performance

  • Improved NOCOW write checks, yielding a throughput increase of approximately 9% in sample tests.

Mount Options

  • New rescue= modes allow read-only mounting of partially converted images by user-space tools.
  • ignoremetacsums: Ignores invalid metadata checksums.
  • ignoresuperflags: Ignores superblock flags tracking conversion progress (e.g., UUID or checksums).

Miscellaneous

  • Send and relocation tasks (e.g., balance, device removal, shrink, block group reclaim) can now run in parallel.
  • Device addition with paused balance.
  • Zoned mode now supports ZNS and DUP metadata.