Blog/Btrfs-progs v5.12 released

From Forza's ramblings

2021-05-10: Btrfs-progs v5.12 was released with Zoned mode support![edit | edit source]

The Alibiphon, an answering machine using a magnetic disc for recording. Circa 1957.

A new version of btrfs-progs was released May 10th. The full changelog can be found on the Btrfs wiki https://btrfs.wiki.kernel.org/index.php/Changelog#By_version_.28btrfs-progs.29

The big notable change is that the first bits for supporting Zoned block devices are now shipped with btrfs-progs 5.12 together with Linux kernel 5.12! There are several limitations in its support, but it's exciting to see that the development has come so far.

Read Modify Write[edit | edit source]

Flash based media (SSD and NVME) and SMR hard drives (HDD) are built up up several smaller blocks of storage. Data can only be appended to these blocks, never written or added to in the middle. If you wanted to change some data in the middle of a block, the drive would have to read the whole block to memory, make the change and then write out the whole block again. It is called read-modify-write, or RMW.

Until today all of this is happening inside the disk's firmware with the OS or filesystem unaware of it. RMW cycles are much slower than normal writes, which is very noticeable, especially on HDD's employing SMR.

Zoned block device[edit | edit source]

Zoned mode aims to improve the poor performance by making the filesystem be aware of the internal zones of the device.

There are three modes:

  • Drive Managed Zones
  • Host Managed Zones
  • Host Aware Zones

Drive managed zones is the existing mode where the zones are invisible to the host operating system and filesystem. All flash media and SMR hard drives are currently drive managed.

Host Managed Zoned drives require a operating system and filesystem with zoned support to work.

Host Aware Zoned drives takes advantage of OS/filesystem support but are otherwise backwards compatible.

More information about Zoned block storage is available at https://www.zonedstorage.io/

Details on Btrfs support is available at https://btrfs.wiki.kernel.org/index.php/Zoned