This update on btrfs development comes from Liu Bo, an Oracle Linux Kernel developer and key upstream btrfs contributor.

The btrfs community continues to thrive. In 2017, btrfs had key developers from Fujitsu, Facebook, Oracle and SuSE, as well as contributions from several NAS companies. The primary use cases for btrfs fall into two categories: single disk btrfs for ‘/’ and ‘/home’ and multiple disk btrfs for NAS-type workloads.

Over the past year, stabilizing btrfs has been placed as the top priority, there are 117 commits with the start of “btrfs: fix …”, so basically we’re fixing btrfs everywhere.

Major Features for BTRFS: 

  • Linux kernel v4.13: A new compression algorithm ‘zstd’ is introduced to btrfs, it is as fast as lzo and offers as good compression ratio as zlib. Benchmark details are available at btrfs: Add zstd support
  • Linux kernel v4.14Compression heuristic support is introduced to btrfs, it can apply a few heuristics to the data before they’re compressed to decide if it’s likely to gain any space savings.
  • Linux kernel v4.15: A new mount option ref-verify and a new config CONFIG_BTRFS_FS_REF_VERIFY is added in order to offer debugging ability on internal delayed refs.
  • Further in the future, we’ll continue the work on hotspareDAX support for persistent memoryraid56 journal (to plug write hole) and conversion to iomap infrastructure. All of them already have at least RFC patches, so we need to revise and improve them to address the concern and feedback on the mailing list.

In addition to these features, we introduced bug fixes that will help applications and users: 

  • ENOSPC: Some early ‘no space’ errors are still spotted in the field even after ticketed reservation mechanism is now adopted by btrfs, and a bunch of fixes have been made to improve that. Problems would only occur on nearly-full btrfs filesystems. This change also improves the overall performance while filesystem grows. 
  • send: btrfs send is often used to provide incremental update support, it has been integrated into some NAS solutions and with their help, we found and fixed a few incorrect behaviors when sending ‘rmdir’ and some other bugs when cooperating with NO_HOLE feature and inline extents.
  • backref walking (for Offline Deduplication): Offline deduplication can produce a large number of shared extents, which will cause slowness for tools using FIEMAP when checking whether the extent of interest is shared by multiple files (or even within the same file). With these changes, In-memory backrefs now get stored in rb-tree instead of list so that insertion merging is possbile and shared extent can be easily found and immediately returned while inserting backrefs.
  • raid6 and scrub: We successfully identified a bug laid in raid6 reconstruction process which prevented btrfs from mounting. Fixes have been delivered in both upstream and stable kernel. Moreover, the community also found and fixed a bug in raid6 support of scrub, which can cause wrong parity in a certain data stripe.

In addition to the above, there are also changes proposed to btrfs-progs which rewrites btrfs progs as a python lib (libbtrfsutil) and changes the license from GPL to LGPL. This license change will make it easier to have unit testing and better integration with third party tools. 

This is a small sampling of the many good features in btrfs, and we will continue to improve btrfs’s current features and functionality.