Changes (kernel/version)
变更(内核/版本) 

Summary of kernel changes for each version.


6.0 (Oct 2022) 6.0 (2022 年 10 月) 

Pull requests: v6.0-rc1, v6.0-rc1, v6.0-rc2, v6.0-rc3, v6.0-rc5, v6.0-rc7
拉取请求: v6.0-rc1, v6.0-rc1, v6.0-rc2, v6.0-rc3, v6.0-rc5, v6.0-rc7

  • sysfs updates: sysfs 更新:

    • export chunk size, in debug mode add tunable for setting its size

    • show zoned among features (was only in debug mode)

    • show commit stats (number, last/max/total duration)

    • mixed_backref and big_metadata sysfs feature files removed, they’ve been default for sufficiently long time, there are no known users and mixed_backref could be confused with mixed_groups
      删除了 mixed_backref 和 big_metadata sysfs 功能文件,它们已被默认使用很长时间,没有已知用户,而且 mixed_backref 可能会与 mixed_groups 混淆。

  • send protocol updated to version 2
    发送协议更新为第 2 版

    • new commands: 新命令:

      • ability write larger data chunks than 64K
        能写入大于 64K 的数据块

      • send raw compressed extents (uses the encoded data ioctls), ie. no decompression on send side, no compression needed on receive side if supported

      • send ‘otime’ (inode creation time) among other timestamps
        发送 "otime"(节点创建时间)和其他时间戳

      • send file attributes (a.k.a file flags and xflags)
        发送文件属性(又称文件标志和 xflags)

    • this is first version bump, backward compatibility on send and receive side is provided

    • there are still some known and wanted commands that will be implemented in the near future, another version bump will be needed, however we want to minimize that to avoid causing usability issues

  • print checksum type and implementation at mount time

  • don’t print some messages at mount (mentioned as people asked about it), we want to print messages namely for new features so let’s make some space for that:

    • big metadata - this has been supported for a long time and is not a feature that’s worth mentioning

    • skinny metadata - same reason, set by default by mkfs
      瘦元数据 - 相同原因,由 mkfs 默认设置

Performance improvements:

  • reduced amount of reserved metadata for delayed items

    • when inserted items can be batched into one leaf

    • when deleting batched directory index items

    • when deleting delayed items used for deletion

    • overall improved count of files/sec, decreased subvolume lock contention

  • metadata item access bounds checker micro-optimized, with a few percent of improved runtime for metadata-heavy operations

  • increase direct io limit for read to 256 sectors, improved throughput by 3x on sample workload
    将读取的直接 io 限制提高到 256 个扇区,将样本工作量的吞吐量提高了 3 倍

Notable fixes: 值得注意的修复:

  • raid56

    • reduce parity writes, skip sectors of stripe when there are no data updates

    • restore reading from stripe cache instead of triggering new read

  • refuse to replay log with unknown incompat read-only feature bit set

  • tree-checker verifies if extent items don’t overlap
    tree-checker 检查范围项是否重叠

  • check that subvolume is writable when changing xattrs from security namespace
    从安全命名空间更改 xattrs 时,检查子卷是否可写

  • fix space cache corruption and potential double allocations; this is a rare bug but can be serious once it happens, stable backports and analysis tool will be provided

  • zoned: 区划:

    • fix page locking when COW fails in the middle of allocation
      修复 COW 在分配过程中失败时的页面锁定问题

    • improved tracking of active zones, ZNS drives may limit the number and there are ENOSPC errors due to that limit and not actual lack of space
      改进对活动区的跟踪,ZNS 驱动器可能会限制数量,而 ENOSPC 错误是由于该限制而非实际空间不足造成的

    • adjust maximum extent size for zone append so it does not cause late ENOSPC due to underreservation
      调整区域附加的最大范围大小,使其不会因保留不足而导致 ENOSPC 延迟

  • mirror reading error messages show the mirror number

  • don’t fallback to buffered IO for NOWAIT direct IO writes, we don’t have the NOWAIT semantics for buffered io yet
    对于 NOWAIT 直接 IO 写入,不要回退到缓冲 IO,我们还没有缓冲 IO 的 NOWAIT 语义

  • send, fix sending link commands for existing file paths when there are deleted and created hardlinks for same files

  • repair all mirrors for profiles with more than 1 copy (raid1c34)
    修复有 1 个以上副本的配置文件的所有镜像 (raid1c34)

  • fix repair of compressed extents, unify where error detection and repair happen

6.1 (Dec 2022) 6.1 (2022 年 12 月) 

Pull requests: v6.1-rc1, v6.1-rc1, v6.1-rc2, v6.1-rc4, v6.1-rc4, v6.1-rc5, v6.1-rc7
拉取请求: v6.1-rc1, v6.1-rc1, v6.1-rc2, v6.1-rc4, v6.1-rc4, v6.1-rc5, v6.1-rc7

Performance: 性能:

  • outstanding FIEMAP speed improvements:
    出色的 FIEMAP 速度改进

    • algorithmic change how extents are enumerated leads to orders of magnitude speed boost (uncached and cached)

    • extent sharing check speedup (2.2x uncached, 3x cached)
      程度共享检查速度提高(未缓存为 2.2 倍,缓存为 3 倍)

    • add more cancellation points, allowing to interrupt seeking in files with large number of extents

    • more efficient hole and data seeking (4x uncached, 1.3x cached)
      更高效的洞和数据搜索(4x 未缓存,1.3x 缓存)

    • sample results: 256M, 32K extents: 4s -> 29ms (~150x) 512M, 64K extents: 30s -> 59ms (~550x) 1G, 128K extents: 225s -> 120ms (~1800x)
      样本结果:256M,32K extents:4s -> 29ms (~150x) 512M, 64K extents:30s -> 59ms (~550x) 1G, 128K extents:225 秒 -> 120ms (~1800x)

  • improved inode logging, especially for directories (on dbench workload throughput +25%, max latency -21%)
    改进了节点日志记录,尤其是目录日志记录(在 dbench 工作负载中,吞吐量提高了 25%,最大延迟降低了 21)

  • improved buffered IO, remove redundant extent state tracking, lowering memory consumption and avoiding rb tree traversal
    改进了缓冲 IO,删除了多余的范围状态跟踪,降低了内存消耗,避免了 rb 树遍历

  • add sysfs tunable to let qgroup temporarily skip exact accounting when deleting snapshot, leading to a speedup but requiring a rescan after that, will be used by snapper
    添加 sysfs 可调整项,让 qgroup 在删除快照时暂时跳过精确记账,从而提高速度,但之后需要重新扫描,这将被 snapper 使用

  • support io_uring and buffered writes, until now it was just for direct IO, with the no-wait semantics implemented in the buffered write path it now works and leads to speed improvement in IOPS (2x), throughput (2.2x), latency (depends, 2x to 150x)
    支持 io_uring 和缓冲写入,在此之前,它只适用于直接 IO,而在缓冲写入路径中实施了无等待语义后,它现在可以工作,并在 IOPS(2 倍)、吞吐量(2.2 倍)和延迟(取决于情况,2 倍至 150 倍)方面带来速度提升

  • small performance improvements when dropping and searching for extent maps as well as when flushing delalloc in COW mode (throughput +5MB/s)
    在 COW 模式下丢弃和搜索范围映射以及刷新 delalloc 时,性能略有提高(吞吐量每秒提高 5MB)

User visible changes: 用户可见的更改:

  • new incompatible feature block-group-tree adding a dedicated tree for tracking block groups, this allows a much faster load during mount and avoids seeking unlike when it’s scattered in the extent tree items
    新的不兼容功能 "区块组树 "为跟踪区块组添加了一个专用树,这样在加载时可以更快地加载区块组,并避免像分散在范围树中的项目那样被搜索到。

    • this reduces mount time for many-terabyte sized filesystems

    • conversion tool will be provided so existing filesystem can also be updated in place

    • to reduce test matrix and feature combinations requires no-holes and free-space-tree (mkfs defaults since 5.15)
      以减少测试矩阵和特征组合,需要无孔和自由空间树(自 5.15 起 mkfs 默认值)

  • improved reporting of super block corruption detected by scrub

  • scrub also tries to repair super block and does not wait until next commit
    scrub 也会尝试修复超级程序块,而不会等到下一次提交

  • discard stats and tunables are exported in sysfs (/sys/fs/btrfs/FSID/discard)
    丢弃统计信息和可调参数在 sysfs(/sys/fs/btrfs/FSID/discard)中导出

  • qgroup status is exported in sysfs (/sys/sys/fs/btrfs/FSID/qgroups/)
    qgroup 状态在 sysfs 中导出(/sys/sys/fs/btrfs/FSID/qgroups/)。

  • verify that super block was not modified when thawing filesystem

Fixes: 修复:

  • FIEMAP fixes: FIEMAP 修复:

    • fix extent sharing status, does not depend on the cached status where merged

    • flush delalloc so compressed extents are reported correctly
      刷新 delalloc,以便正确报告压缩的扩展名

  • fix alignment of VMA for memory mapped files on THP
    修复 THP 上内存映射文件的 VMA 对齐问题

  • send: fix failures when processing inodes with no links (orphan files and directories)

  • handle more corner cases for read-only compat feature verification

  • fix crash on raid0 filesystems created with <5.4 mkfs.btrfs that could lead to division by zero
    修复在使用 <5.4 mkfs.btrfs 创建的 raid0 文件系统上可能导致除以零的崩溃问题

Core: 核心:

  • preliminary support for fs-verity in send

  • more effective memory use in scrub for subpage where sector is smaller than page

  • block group caching progress logic has been removed, load is now synchronous

  • add no-wait semantics to several functions (tree search, nocow, flushing, buffered write

6.2 (Feb 2023) 6.2 (2023 年 2 月) 

Pull requests: v6.2-rc1, v6.2-rc3, v6.2-rc3, v6.2-rc5, v6.2-rc5, v6.2-rc5, v6.2-rc8, v6.2-rc8
拉取请求: v6.2-rc1, v6.2-rc3, v6.2-rc3, v6.2-rc5, v6.2-rc5, v6.2-rc5, v6.2-rc8, v6.2-rc8

User visible features: 用户可见的功能:

  • raid56 reliability vs performance trade off:
    raid56 可靠性与性能的权衡:

    • fix destructive RMW for raid5 data (raid6 still needs work) - do full RMW cycle for writes and verify all checksums before overwrite, this should prevent rewriting potentially corrupted data without notice
      修复 RAID5 数据的破坏性 RMW(RAID6 仍需改进)--写入时执行完整的 RMW 循环,并在覆盖前验证所有校验和,这应可防止在未通知的情况下重写可能已损坏的数据

    • stripes are cached in memory which should reduce the performance impact but still can hurt some workloads

    • checksums are verified after repair again

    • this is the last option without introducing additional features (write intent bitmap, journal, another tree), the RMW cycle was supposed to be avoided by the original implementation exactly for performance reasons but that caused all the reliability problems
      这是在不引入额外功能(写入意图位图、日志、另一棵树)的情况下的最后一种选择,最初的实现正是出于性能方面的考虑而避免了 RMW 循环,但这导致了所有的可靠性问题

  • discard=async by default for devices that support it
    对于支持 discard=async 的设备,默认情况下会这样做

  • implement emergency flush reserve to avoid almost all unnecessary transaction aborts due to ENOSPC in cases where there are too many delayed refs or delayed allocation
    在有太多延迟引用或延迟分配的情况下,实施紧急刷新储备,以避免因 ENOSPC 而导致的几乎所有不必要的事务中止

  • skip block group synchronization if there’s no change in used bytes, can reduce transaction commit count for some workloads

  • print more specific errors to system log when device scan ioctl fails
    当设备扫描 ioctl 失败时,在系统日志中打印更具体的错误信息

Performance improvements:

  • fiemap and lseek: fiemap 和 lseek:

    • overall speedup due to skipping unnecessary or duplicate searches (-40% run time)
      由于跳过了不必要或重复的搜索,整体速度提高(-40% 运行时间)

    • cache some data structures and sharedness of extents (-30% run time)
      缓存某些数据结构和共享扩展(-30% 运行时间)

  • send: 发送:

    • faster backref resolution when finding clones

    • cached leaf to root mapping for faster backref walking

    • improved clone/sharing detection

    • overall run time improvements (-70%)

Fixes: 修复:

  • fix compat ro feature check at read-write remount
    修复读写重挂载时的 compat ro 功能检查

  • handle case when read-repair happens with ongoing device replace

  • reset defrag ioctl buffer on memory allocation error
    内存分配错误时重置除渣 ioctl 缓冲区

  • fix potential crash in quota when rescan races with disable

  • fix qgroup accounting warning when rescan can be started at time with temporarily disabled accounting
    修正 qgroup 会计警告,当重新扫描可以在暂时禁用会计时启动

  • don’t cache a single-device filesystem device to avoid cases when a loop device is reformatted and the entry gets stale

  • limit number of send clones by maximum memory allocated

6.3 (Apr 2023) 6.3 (2023 年 4 月) 

Pull requests: v6.3-rc1, v6.3-rc2, v6.3-rc4, v6.3-rc5, v6.3-rc7, v6.3
拉取请求: v6.3-rc1, v6.3-rc2, v6.3-rc4, v6.3-rc5, v6.3-rc7, v6.3

Features: 特点

  • block group allocation class heuristics:

    • pack files by size (up to 128k, up to 8M, more) to avoid fragmentation in block groups, assuming that file size and life time is correlated, in particular this may help during balance
      假定文件大小和生命周期相关,按大小(最多 128k、最多 8M,更多)打包文件,以避免在块组中出现碎片,特别是在平衡过程中,这可能会有所帮助

    • with tracepoints and extensible in the future

  • sysfs export of per-device fsid in DEV_INFO ioctl to distinguish seeding devices, needed for testing
    sysfs 在 DEV_INFO ioctl 中导出每个设备的 fsid,以区分播种设备,这是测试所需的

  • print sysfs stats for the allocation classes
    打印分配类别的 sysfs 统计信息

Performance: 性能:

  • send: cache directory utimes and only emit the command when necessary

    • speedup up to 10x 速度提高 10 倍

    • smaller final stream produced (no redundant utimes commands issued),
      产生的最终数据流更小(没有发出多余的 utimes 命令)、

    • compatibility not affected

  • fiemap: fiemap:

    • skip backref checks for shared leaves

    • speedup 3x on sample filesystem with all leaves shared (e.g. on snapshots)
      在所有叶子共享的示例文件系统上(如快照),速度提高 3 倍

  • micro optimized b-tree key lookup, speedup in metadata operations (sample benchmark: fs_mark +10% of files/sec)
    对 B 树键查找进行了微优化,加快了元数据操作速度(示例基准:fs_mark +10% 的文件/秒)

Core changes: 核心变化:

  • change where checksumming is done in the io path
    更改 io 路径中校验和的位置

    • checksum and read repair does verification at lower layer

    • cascaded cleanups and simplifications

Fixes: 修复:

  • sysfs: make sure that a run-time change of a feature is correctly tracked by the feature files
    sysfs: 确保运行时对功能的更改能被功能文件正确跟踪

  • scrub: better reporting of tree block errors

  • fix calculation of unusable block group space reporting bogus values due to 32/64b division
    修正因 32/64b 分区而导致的计算不可用区块组空间报告错误值的问题

  • fix unnecessary increment of read error stat on write error

  • scan block devices in non-exclusive mode to avoid temporary mkfs failures
    以非排他性模式扫描块设备,以避免 mkfs 出现临时故障

  • fix fast checksum detection, this affects filesystems with non-crc32c checksum, calculation would not be offloaded to worker threads (since 5.4)
    修复快速校验和检测,这会影响使用非 crc32c 校验和的文件系统,计算工作将无法卸载到工作线程(自 5.4 起)

  • restore thread_pool mount option behaviour for endio workers, the new value for maximum active threads would not be set to the actual work queues (since 6.0)
    恢复 Endio Worker 的线程池挂载选项行为,最大活动线程的新值不会设置为实际工作队列(自 6.0 起)

6.4 (Jun 2023) 6.4(2023 年 6 月) 

Pull requests: v6.4-rc1, v6.4-rc2, v6.4-rc2, v6.4-rc4, v6.4-rc5, v6.4-rc5, v6.4-rc7, v6.4-rc7, v6.4, v6.4
拉取请求: v6.4-rc1, v6.4-rc2, v6.4-rc2, v6.4-rc4, v6.4-rc5, v6.4-rc5, v6.4-rc7, v6.4-rc7, v6.4, v6.4

Performance improvements:

  • improve logging changes in a directory during one transaction, avoid iterating over items and reduce lock contention (fsync time 4x lower)
    在一个事务中更好地记录目录中的更改,避免项目迭代,减少锁争用(同步时间缩短 4 倍)

  • when logging directory entries during one transaction, reduce locking of subvolume trees by checking tree-log instead (improvement in throughput and latency for concurrent access to a subvolume)

Notable fixes: 值得注意的修复:

  • device replace: 设备更换:

    • properly honor read mode when requested to avoid reading from source device

    • target device won’t be used for eventual read repair, this is unreliable for NODATASUM files
      目标设备不会被用于最终读取修复,这对 NODATASUM 文件不可靠

    • when there are unpaired (and unrepairable) metadata during replace, exit early with error and don’t try to finish whole operation

  • scrub ioctl properly rejects unknown flags
    scrub ioctl 正确拒绝未知标记

  • fix partial direct io write when there’s a page fault in the middle, iomap will try to continue with partial request but the btrfs part did not match that, this can lead to zeros written instead of data
    修复部分直接 io 写入(当中间出现页面故障时),iomap 会尝试继续部分请求,但 btrfs 部分与之不匹配,这可能导致写入的是 0 而不是数据

  • fix backref walking, this breaks a mode of LOGICAL_INO_V2 ioctl that is used in deduplication tools
    修复反向引用走行,这会破坏重复数据删除工具中使用的 LOGICAL_INO_V2 ioctl 模式

  • make mount option clear_cache work with block-group-tree, to rebuild free-space-tree instead of temporarily disabling it that would lead to a forced read-only mount
    使挂载选项 clear_cache 与 block-group-tree 一起使用,以重建自由空间树,而不是临时禁用它,因为临时禁用会导致强制只读挂载

Core changes: 核心变化:

  • io path io 路径

    • continued cleanups and refactoring around bio handling

    • extent io submit path simplifications and cleanups
      extent io 提交路径的简化和清理

    • flush write path simplifications and cleanups

    • rework logic of passing sync mode of bio, with further cleanups

  • rewrite scrub code flow, restructure how the stripes are enumerated and verified in a more unified way

  • allow to set lower threshold for block group reclaim in debug mode to aid zoned mode testing

  • remove obsolete time-based delayed ref throttling logic when truncating items
    删除截断项目时过时的基于时间的延迟 ref 节流逻辑

6.5 (Aug 2023) 6.5 (2023 年 8 月) 

Pull requests: v6.5-rc1, v6.5-rc3, v6.5-rc4, v6.5-rc6, v6.5-rc7
拉取请求: v6.5-rc1、v6.5-rc3、v6.5-rc4、v6.5-rc6、v6.5-rc7

Performance improvements:

  • speedup in fsync(), better tracking of inode logged status can avoid transaction commit
    加速 fsync(),更好地跟踪 inode 记录状态,避免事务提交

  • IO path structures track logical offsets in data structures and does not need to look it up
    IO 路径结构跟踪数据结构中的逻辑偏移,无需查找

  • submit IO synchronously for fast checksums (crc32c and xxhash), remove high priority worker kthread
    同步提交 IO 以进行快速校验(crc32c 和 xxhash),移除高优先级工作 Kthread

User visible changes: 用户可见的更改:

  • don’t commit transaction for every created subvolume, this can reduce time when many subvolumes are created in a batch

  • print affected files when relocation fails

  • trigger orphan file cleanup during START_SYNC ioctl
    在 START_SYNC ioctl 期间触发孤儿文件清理

  • the async=discard has been enabled in 6.2 unconditionally, but for zoned mode it does not make that much sense to do it asynchronously as the zones are reset as needed
    async=discard 已在 6.2 中无条件启用,但对于分区模式来说,异步启用的意义不大,因为分区会根据需要重置

6.6 (Oct 2023) 6.6 (2023 年 10 月) 

Pull requests: v6.6-rc1, v6.6-rc2, v6.6-rc3, v6.6-rc4, v6.6-rc5, v6.6-rc6, v6.6-rc7 (1), v6.6-rc8 (2),
拉取请求:v6.6-rc1、v6.6-rc2、v6.6-rc3、v6.6-rc4、v6.6-rc5、v6.6-rc6、v6.6-rc7 (1)、v6.6-rc8 (2)、

Notable fixes: 值得注意的修复:

  • scrub performance drop due to rewrite in 6.4 partially restored, the drop is noticeable on fast PCIe devices, -66% and restored to -33% of the original
    部分恢复了 6.4 重写导致的擦除性能下降,在快速 PCIe 设备上下降明显,为原来的 -66% 并恢复到 -33

  • copy directory permissions and time when creating a stub subvolume

  • fix transaction commit stalls when auto relocation is running and blocks other tasks that want to commit

  • change behaviour of readdir()/rewinddir() when new directory entries are created after opendir(), properly tracking the last entry
    改变 readdir()/rewinddir() 在 opendir() 之后创建新目录条目时的行为,正确跟踪最后一个条目

Core: 核心:

  • debugging feature integrity checker deprecated, to be removed in 6.7
    调试功能完整性检查器已废弃,将在 6.7 中移除

  • in zoned mode, zones are activated just before the write, making error handling easier, now the overcommit mechanism can be enabled again which improves performance by avoiding more frequent flushing

  • v0 extent handling completely removed, deprecated long time ago
    v0 完全删除了程度处理,早已弃用

6.7 (Jan 2024) 6.7 (2024 年 1 月) 

Pull requests: v6.7-rc1, v6.7-rc2, v6.7-rc4, v6.7-rc6 (1), v6.7-rc6 (2),
拉取请求:v6.7-rc1、v6.7-rc2、v6.7-rc4、v6.7-rc6 (1)、v6.7-rc6 (2)、

New features: 新功能

  • raid-stripe-tree: New tree for logical file extent mapping where the physical mapping may not match on multiple devices. This is now used in zoned mode to implement RAID0/RAID1* profiles, but can be used in non-zoned mode as well. The support for RAID56 is in development and will eventually fix the problems with the current implementation. This is a backward incompatible feature and has to be enabled at mkfs time.
    raid-stripe-tree:用于逻辑文件范围映射的新树,物理映射可能在多个设备上不匹配。该功能现在用于在分区模式下实施 RAID0/RAID1* 配置文件,但也可用于非分区模式。对 RAID56 的支持正在开发中,最终将解决目前实施中存在的问题。这是一项向后不兼容的功能,必须在 mkfs 时启用。

  • simple quota accounting (squota): A simplified mode of qgroup that accounts all space on the initial extent owners (a subvolume), the snapshots are then cheap to create and delete. The deletion of snapshots in fully accounting qgroups is a known CPU/IO performance bottleneck.
    简单配额核算(squota):一种简化的 qgroup 模式,可核算初始范围所有者(子卷)上的所有空间,创建和删除快照的成本都很低。在完全核算的 qgroup 中删除快照是一个已知的 CPU/IO 性能瓶颈。

    Note: The squota is not suitable for the general use case but works well for containers where the original subvolume exists for the whole time. This is a backward incompatible feature as it needs extending some structures, but can be enabled on an existing filesystem.
    注意:squota 不适合一般使用情况,但对于原始子卷一直存在的容器来说,效果很好。这是一个向后不兼容的功能,因为它需要扩展某些结构,但可以在现有文件系统上启用。

  • temporary filesystem fsid (temp_fsid): The fsid identifies a filesystem and is hard coded in the structures, which disallows mounting the same fsid found on different devices.
    临时文件系统 fsid(temp_fsid):fsid 是文件系统的标识,硬编码在结构上,因此不允许挂载不同设备上的相同 fsid。

    For a single device filesystem this is not strictly necessary, a new temporary fsid can be generated on mount e.g. after a device is cloned. This will be used by Steam Deck for root partition A/B testing, or can be used for VM root images.
    对于单个设备文件系统来说,这并非绝对必要,可以在挂载时生成一个新的临时 fsid,例如在克隆设备后。这将被 Steam Deck 用于根分区 A/B 测试,也可用于虚拟机根镜像。

  • filesystems with partially finished metadata_uuid conversion cannot be mounted anymore and the uuid fixup has to be done by btrfs-progs (btrfstune).
    已完成部分 metadata_uuid 转换的文件系统无法再挂载,uuid 修复必须由 btrfs-progs (btrfstune) 完成。

Performance improvements:

  • reduce reservations for checksum deletions (with enabled free space tree by factor of 4), on a sample workload on file with many extents the deletion time decreased by 12%
    减少校验和删除的预留空间(启用的可用空间树为 4 倍),在一个有多个扩展名的文件样本工作量中,删除时间减少了 12

  • make extent state merges more efficient during insertions, reduce rb-tree iterations (run time of critical functions reduced by 5%)
    在插入过程中提高状态合并的效率,减少 rb-tree 的迭代(关键函数的运行时间减少 5%)

Core changes: 核心变化:

  • the integrity check functionality has been removed, this was a debugging feature and removal does not affect other integrity checks like checksums or tree-checker

  • space reservation changes:

    • more efficient delayed ref reservations, this avoids building up too much work or overusing or exhausting the global block reserve in some situations
      更高效的延迟 ref 保留,可避免在某些情况下积累过多工作或过度使用或耗尽全局区块储备

    • move delayed refs reservation to the transaction start time, this prevents some ENOSPC corner cases related to exhaustion of global reserve
      将延迟参考预留移至交易开始时间,从而避免了一些与全局预留耗尽有关的 ENOSPC 死角

    • adjust overcommit logic in near full situations, account for one more chunk to eventually allocate metadata chunk, this is mostly relevant for small filesystems (<10GiB)

  • single device filesystems are scanned but not registered (except seed devices), this allows temp_fsid to work
    单设备文件系统会被扫描,但不会被注册(种子设备除外),这样 temp_fsid 就可以工作了

6.8 (Mar 2024) 6.8 (2024 年 3 月) 

Pull requests: v6.8-rc1, v6.8-rc2, v6.8-rc4, v6.8-rc5, v6.8-rc6, v6.8-rc7 (1), v6.8-rc7 (2)
拉取请求: v6.8-rc1, v6.8-rc2, v6.8-rc4, v6.8-rc5, v6.8-rc6, v6.8-rc7 (1), v6.8-rc7 (2)

Core changes: 核心变化:

  • convert extent buffers to folios: - direct API conversion where possible - performance can drop by a few percent on metadata heavy
    将范围缓冲区转换为对开区:- 在可能的情况下直接进行 API 转换 - 在元数据较多的情况下,性能可能会下降几个百分点

    workloads, the folio sizes are not constant and the calculations add up in the item helpers

    • both regular and subpage modes

    • data cannot be converted yet, we need to port that to iomap and there are some other generic changes required
      数据还不能转换,我们需要将其移植到 iomap,还需要做一些其他的通用修改

  • convert mount to the new API, should not be user visible: - options deprecated long time ago have been removed: inode_cache,
    将挂载转换为新的应用程序接口,用户不应看到: - 很久以前废弃的选项已被移除: inode_cache、

    recovery 恢复

    • the new logic that splits mount to two phases slightly changes timing of device scanning for multi-device filesystems

    • LSM options will now work (like for selinux)
      LSM 选项现在可以工作了(与 selinux 类似)

  • convert delayed nodes radix tree to xarray, preserving the preload-like logic that still allows to allocate with GFP_NOFS
    将延迟节点 radix 树转换为 xarray,保留类似预加载的逻辑,仍可使用 GFP_NOFS 进行分配

Performance improvements:

  • refactor chunk map structure, reduce size and improve performance

  • extent map refactoring, smaller data structures, improved performance

  • reduce size of struct extent_io_tree, embedded in several structures
    缩小嵌入多个结构的 extent_io_tree 结构的大小

  • temporary pages used for compression are cached and attached to a shrinker, this may slightly improve performance

Fixes: 修复:

  • fix over-reservation of metadata chunks due to not keeping proper balance between global block reserve and delayed refs reserve; in practice this leaves behind empty metadata block groups, the workaround is to reclaim them by using the ‘-musage=1’ balance filter
    修复因未在全局块储备和延迟参考储备之间保持适当平衡而导致元数据块储备过多的问题;在实际操作中,这会留下空的元数据块组,解决方法是使用"-musage=1 "平衡过滤器来回收它们

  • fix corner case of send that would generate potentially large stream of zeros if there’s a hole at the end of the file

  • fix chunk validation in zoned mode on conventional zones, it was possible to create chunks that would not be allowed on sequential zones


5.0 (Mar 2019) 5.0 (2019 年 3 月) 

Pull requests: v5.0-rc1, v5.0-rc2, v5.0-rc3, v5.0-rc5
拉取请求: v5.0-rc1、v5.0-rc2、v5.0-rc3、v5.0-rc5

Features, hilights: 特点、亮点:

  • swapfile support (with some limitations)
    支持 swapfile(有一定限制)

  • metadata uuid - new feature that allows fast uuid change without rewriting all metadata blocks (backward incompatible)
    元数据 uuid - 新功能允许快速更改 uuid,而无需重写所有元数据块(向后不兼容)

  • balance messages in the syslog when operations start or stop

Fixes: 修复:

  • improved check of filesystem id associated with a device during scan to detect duplicate devices that could be mixed up during mount
    改进了扫描过程中与设备关联的文件系统 id 检查,以检测挂载过程中可能混淆的重复设备

  • fix device replace state transitions

  • fix a crash due to a race when quotas are enabled during snapshot creation

  • GFP_NOFS/memalloc_nofs_* fixes
    GFP_NOFS/memalloc_nofs_* 修复

  • fsync fixes fsync 修复

Other: 其他

  • remove first phase of balance that tried to remove some space (not necessary)

  • separate reserve for delayed refs from global reserve

  • cleanups 清理

  • see [ pull request]
    参见 [ pull request]

5.1 (May 2019) 5.1 (2019 年 5 月) 

Pull requests: v5.1-rc1, v5.1-rc1, v5.1-rc3, v5.1-rc5, v5.1-rc7
拉取请求: v5.1-rc1, v5.1-rc1, v5.1-rc3, v5.1-rc5, v5.1-rc7

New features, hilights: 新功能、亮点:

  • zstd compression levels can be set as mount options
    zstd 压缩级别可设置为挂载选项

  • new ioctl to unregister scanned devices
    用于取消注册已扫描设备的新 ioctl

  • scrub prints messages about start/stop/cancel to the log
    scrub 在日志中打印有关启动/停止/取消的信息

Other changes: 其他变化:

  • qgroups skip some work (est. speedup during balance 20%)
    qgroups 跳过一些工作(估计在平衡期间速度提高 20)

  • reclaim vs GFP_KERNEL fixes
    回收与 GFP_KERNEL 修复

  • fsync fixes for rename/unlink/rmdir
    重命名/取消链接/rmdir 的 fsync 修正

  • improved enospc handling on a highly fragmented filesystem
    改进了高度碎片化文件系统的 enospc 处理功能

  • no trim on filesystem with unreplayed log

  • see [ pull request]
    参见 [ pull request]

5.2 (Jul 2019) 5.2 (2019 年 7 月) 

Pull requests: v5.2-rc1, v5.2-rc2, v5.2-rc3, v5.2-rc5, v5.2-rc6
拉取请求: v5.2-rc1, v5.2-rc2, v5.2-rc3, v5.2-rc5, v5.2-rc6

User visible changes, hilights:

  • better read time and write checks to catch errors early and before writing data to disk

  • qgroups + metadata relocation: last speed up patch in the series there should be no overhead comparing balance with and without qgroups
    qgroups + 元数据迁移:系列中的最后一个加速补丁,有 qgroups 和没有 qgroups 时的平衡比较应该没有开销。

  • FIEMAP ioctl does not start a transaction unnecessarily
    FIEMAP ioctl 不会不必要地启动事务

  • LOGICAL_INO (v1, v2) does not start transaction unnecessarily
    LOGICAL_INO (v1, v2) 不会不必要地启动事务

  • fsync on files with many (but not too many) hardlinks is faster
    在有许多(但不是太多)硬链接的文件上执行 fsync 更快

  • send tries harder to find ranges to clone

  • trim/discard will skip unallocated chunks that haven’t been touched since the last mount
    trim/discard 将跳过自上次挂载后未分配的数据块

  • tree-checker does more validations: device item, inode item, block group item:
    tree-checker 会进行更多验证:设备项、inode 项、块组项:

  • improved space flushing logic for intense DIO vs buffered workloads
    针对高强度 DIO 与缓冲工作负载,改进了空间刷新逻辑

  • metadata reservations for delalloc reworked to better adapt in many-writers/low-space scenarios
    重新修改了 delalloc 的元数据保留,以更好地适应多写入器/低空间场景

Fixes: 修复:

  • send flushes delayed allocation before start

  • fix fallocate with qgroups accounting underflow
    修复使用 qgroups 的 fallocate 会计下溢问题

  • send and dedupe can’t be run at the same time

  • fix crash in relocation/balance after resume

Other: 其他

  • new tracepoints for locking

  • async write preallocates memory to avoid failures deep in call chains

  • lots of cleanups 大量清理

5.3 (Sep 2019) 5.3 (2019 年 9 月) 

Pull requests: v5.3-rc1, v5.3-rc2, v5.3-rc2, v5.3-rc3, v5.3-rc5, v5.3
拉取请求: v5.3-rc1, v5.3-rc2, v5.3-rc2, v5.3-rc3, v5.3-rc5, v5.3

New features, hilights: 新功能、亮点:

  • chunks that have been trimmed and unchanged since last mount are tracked and skipped on repeated trims

  • use hw assisted crc32c on more arches
    在更多拱门上使用 hw 辅助 crc32c

  • the RAID56 incompat bit is automatically removed when the last block group of that type is removed
    RAID56 不兼容位会在移除最后一个该类型块组时自动移除

Fixes: 修复:

  • update ctime/mtime/iversion after hole punching
    打孔后更新 ctime/mtime/iversion

  • fsync fixes fsync 修复

  • send and balance can’t be run at the same time

Other: 其他

  • code refactoring, file splits

  • preparatory work for more checksums

  • tree checker to verify lengths of various items

  • delayed iput happens at unlink time, not in cleaner thread

  • new tracepoints for space updates

5.4 (Nov 2019) 5.4 (2019 年 11 月) 

Pull requests: v5.4-rc1, v5.4-rc1, v5.4-rc3, v5.4-rc5, v5.4-rc7, v5.4-rc8
拉取请求: v5.4-rc1, v5.4-rc1, v5.4-rc3, v5.4-rc5, v5.4-rc7, v5.4-rc8

  • tree checker: adde sanity checks for tree items, extent items, and references
    树形检查器: 为树形项、范围项和引用添加正确性检查

  • deprecated subvolume creation mode BTRFS_SUBVOL_CREATE_ASYNC

  • qgroup relation deletion tries harder, orphan entries are removed too
    qgroup 关系删除更努力,孤儿条目也会被删除

  • space handling improvements (ticket reservations, flushing, overcommit logic)

  • fix possible lockups during send of large subvolumes

  • see [ pull request]
    参见 [ pull request]

5.5 (Jan 2020) 5.5 (2020 年 1 月) 

Pull requests: v5.5-rc1, v5.5-rc1, v5.5-rc2, v5.5-rc3, v5.5-rc5, v5.5-rc7, v5.5
拉取请求: v5.5-rc1, v5.5-rc1, v5.5-rc2, v5.5-rc3, v5.5-rc5, v5.5-rc7, v5.5

  • new block group profiles: RAID1 with 3- and 4- copies
    新的块组配置文件:带有 3 份和 4 份副本的 RAID1

    • RAID1 in btrfs has always 2 copies, now add support for 3 and 4
      btrfs 中的 RAID1 一直有 2 份副本,现在增加了对 3 份和 4 份副本的支持

    • this is an incompat feature (named RAID1C34)
      这是一个不兼容的功能(名为 RAID1C34)

    • recommended use of RAID1C3 is replacement of RAID6 profile on metadata, this brings a more reliable resiliency against 2 device loss/damage
      建议使用 RAID1C3 代替元数据上的 RAID6 配置文件,这样可以在 2 台设备丢失/损坏时提供更可靠的恢复能力

  • support for new checksums

    • per-filesystem, set at mkfs time
      每个文件系统,在 mkfs 时设置

    • fast hash (crc32c successor): xxhash, 64bit digest
      快速哈希(crc32c 继承者):xxhash,64 位摘要

    • strong hashes (both 256bit): sha256 (slower, FIPS), blake2b (faster)
      强散列(均为 256 位):sha256(较慢,FIPS)、blake2b(较快)

  • speed up lseek, don’t take inode locks unnecessarily, this can speed up parallel SEEK_CUR/SEEK_SET/SEEK_END by 80%
    加速 lseek,不要占用不必要的 inode 锁,这可将并行 SEEK_CUR/SEEK_SET/SEEK_END 的速度提高 80%。

  • send: 发送:

    • allow clone operations within the same file

    • limit maximum number of sent clone references to avoid slow backref walking

  • error message improvements: device scan prints process name and PID
    错误信息改进:设备扫描打印进程名称和 PID

  • new tree-checker sanity tests (INODE_ITEM, DIR_ITEM, DIR_INDEX, INODE_REF, XATTR)

5.6 (Mar 2020) 5.6 (2020 年 3 月) 

Pull requests: v5.6-rc1, v5.6-rc1, v5.6-rc1, v5.6-rc2, v5.6-rc3, v5.6-rc3, v5.6-rc5, v5.6-rc7
拉取请求: v5.6-rc1, v5.6-rc1, v5.6-rc2, v5.6-rc3, v5.6-rc3, v5.6-rc5, v5.6-rc7

Highlights: 亮点

  • async discard 异步丢弃

    • “mount -o discard=async” to enable it
      "mount -o discard=async "来启用它

    • freed extents are not discarded immediatelly, but grouped together and trimmed later, with IO rate limiting
      不立即丢弃已释放的扩展,而是将其分组并在稍后进行修剪,同时限制 IO 速率

    • the actual discard IO requests have been moved out of transaction commit to a worker thread, improving commit latency
      将实际丢弃 IO 请求从事务提交中移至工作线程,从而改善了提交延迟

    • IO rate and request size can be tuned by sysfs files, for now enabled only with CONFIG_BTRFS_DEBUG as we might need to add/delete the files and don’t have a stable-ish ABI for general use, defaults are conservative
      IO 速率和请求大小可通过 sysfs 文件调整,目前仅在 CONFIG_BTRFS_DEBUG 下启用,因为我们可能需要添加/删除这些文件,而且还没有稳定的 ABI 供一般使用,默认值比较保守

  • export device state info in sysfs, e.g. missing, writeable
    在 sysfs 中导出设备状态信息,如丢失、可写等

  • no discard of extents known to be untouched on disk (e.g. after reservation)

  • device stats reset is logged with process name and PID that called the ioctl
    设备统计重置会记录调用 ioctl 的进程名称和 PID

Core changes: 核心变化:

  • qgroup assign returns ENOTCONN when quotas not enabled, used to return EINVAL that was confusing
    qgroup 分配在配额未启用时返回 ENOTCONN,以前返回 EINVAL 会引起混淆

  • device closing does not need to allocate memory anymore

  • snapshot aware code got removed, disabled for years due to performance problems, reimplmentation will allow to select wheter defrag breaks or does not break COW on shared extents
    由于性能问题,快照感知代码已被移除,多年来一直处于禁用状态,重新植入后将允许选择是否在共享扩展上破坏或不破坏 COW 磁盘阵列。

  • tree-checker: tree-checker:

    • check leaf chunk item size, cross check against number of stripes

    • verify location keys for DIR_ITEM, DIR_INDEX and XATTR items
      验证 DIR_ITEM、DIR_INDEX 和 XATTR 项目的位置键

    • new self test for physical -> logical mapping code, used for super block range exclusion
      新的物理 -> 逻辑映射代码自我测试,用于超级区块范围排除

Fixes: 修复:

  • fix missing hole after hole punching and fsync when using NO_HOLES
    修复使用 NO_HOLES 时打孔和同步后的缺孔问题

  • writeback: range cyclic mode could miss some dirty pages and lead to OOM
    回写:范围循环模式可能会漏掉一些脏页,导致 OOM

  • two more corner cases for metadata_uuid change after power loss during the change
    在更改过程中断电后更改元数据_uuid 的另外两个角情况

  • fix infinite loop during fsync after mix of rename operations
    修复混合重命名操作后 fsync 期间的无限循环

5.7 (May 2020) 5.7 (2020 年 5 月) 

Pull requests: v5.7-rc1, v5.7-rc2, v5.7-rc2, v5.7-rc4, v5.7-rc4
拉取请求: v5.7-rc1, v5.7-rc2, v5.7-rc2, v5.7-rc4, v5.7-rc4

Hilights: 希莱斯

  • v2 of ioctl to delete subvolumes, allowing to delete by id and more future extensions
    用于删除子卷的 ioctl v2,允许按 ID 删除,以及更多未来扩展功能

  • removal of obsolete ioctl flag BTRFS_SUBVOL_CREATE_ASYNC
    移除过时的 ioctl 标志 BTRFS_SUBVOL_CREATE_ASYNC

  • more responsive balance cancel

  • speedup of extent back reference resolution

  • reflink/clone_range works on inline extents
    reflink/clone_range 适用于内联扩展名

  • lots of othe core changes, see the [ pull request]
    很多其他核心改动,请参见 [ pull request]

5.8 (Aug 2020)

Pull requests: v5.8-rc1, v5.8-rc1, v5.8-rc3, v5.8-rc5, v5.8-rc5, v5.8-rc7
拉取请求: v5.8-rc1, v5.8-rc1, v5.8-rc3, v5.8-rc5, v5.8-rc5, v5.8-rc7

Hilights: 希莱斯

  • speedup dead root detection during orphan cleanup

  • send will emit file capabilities after chown
    在 chown 之后,send 会发出文件功能

Core changes: 核心变化:

  • improved global block reserve utilization

  • direct io cleanups and fixes
    direct io 清理和修复

  • refactored block group reading code

5.9 (Oct 2020) 5.9 (2020 年 10 月) 

Pull requests: v5.9-rc1, v5.9-rc1, v5.9-rc3, v5.9-rc4, v5.9-rc4, v5.9-rc5, v5.9-rc6, v5.9-rc7, v5.9-rc8
拉取请求: v5.9-rc1, v5.9-rc1, v5.9-rc3, v5.9-rc4, v5.9-rc4, v5.9-rc5, v5.9-rc6, v5.9-rc7, v5.9-rc8

Hilights: 希莱斯

  • add mount option ‘’rescue’’ to unify options for various recovery tasks on a mounted filesystems

  • mount option ‘’inode_cache’’ is deprecated and will be removed in 5.11
    挂载选项"'inode_cache'"已被弃用,将在 5.11 中移除。

  • removed deprecated options ‘’alloc_start’’ and ‘’subvolrootid’’

  • sysfs exports information about qgroups and relations
    sysfs 导出有关 qgroups 和关系的信息

  • FS_INFO ioctl exports more information from the filesystem (notably type of checksum)
    FS_INFO ioctl 从文件系统导出更多信息(主要是校验类型)

  • running balance detects Ctrl-C too
    运行平衡也能检测到 Ctrl-C

  • performance improvements in fsync
    提高 fsync 的性能

  • mount-time prefetch of chunk tree

5.10 (Dec 2020) 5.10 (2020 年 12 月) 

Pull requests: v5.10-rc1, v5.10-rc2, v5.10-rc4, v5.10-rc6
拉取请求: v5.10-rc1、v5.10-rc2、v5.10-rc4、v5.10-rc6

Hilights: 希莱斯

  • performance improvements in fsync (dbench workload: higher throughput, lower latency)
    提高 fsync 性能(dbench 工作负载:更高的吞吐量、更低的延迟)

  • sysfs exports current exclusive operataion (balance, resize, device add/del/…)
    sysfs 导出当前独占操作(平衡、调整大小、设备添加/删除/...)

  • sysfs exports supported send stream version
    支持的 sysfs 导出发送流版本

Core: 核心:

  • direct io uses iomap infrastructure (no more ‘’struct buffer_head’’)
    direct io 使用 iomap 基础设施(不再使用"'struct buffer_head'")。

  • space reservations for data now use ticket infrastructure

  • cleanups, refactoring, preparatory work

  • error handling improvements

  • fixes 修复

5.11 (Feb 2021) 5.11 (2021 年 2 月) 

Pull requests: v5.11-rc1, v5.11-rc3, v5.11-rc4, v5.11-rc5, v5.11-rc6, v5.11
拉取请求: v5.11-rc1, v5.11-rc3, v5.11-rc4, v5.11-rc5, v5.11-rc6, v5.11

  • new mount option ‘’rescue’’, various modes how to access a damaged filesystem

  • sysfs updates: filesystem generation, supported ‘’rescue’’ modes, read mirror policy
    sysfs 更新:文件系统生成、支持的 "救援 "模式、读取镜像策略

  • removed feature: ‘’mount -o inode_cache’’
    已删除功能:"'mount -o inode_cache

  • free space tree fixes, v1 cache removed during conversion
    修复自由空间树,在转换过程中移除 v1 缓存

Core: 核心:

  • locking switched to standard rw semaphores
    锁定切换为标准 rw semaphores

  • direct IO ported to iomap infrastructure
    直接 IO 移植到 iomap 基础架构

  • zoned allocation mode preparation

  • subpage blocksize preparation

  • various performance improvements (skipping unnecessary work)

5.12 (Apr 2021) 5.12 (2021 年 4 月) 

Pull requests: v5.12-rc1, v5.12-rc1, v5.12-rc2, v5.12-rc2, v5.12-rc2, v5.12-rc4, v5.12-rc5, v5.12-rc7
拉取请求: v5.12-rc1, v5.12-rc1, v5.12-rc2, v5.12-rc2, v5.12-rc2, v5.12-rc4, v5.12-rc5, v5.12-rc7

Features: 特点

  • zoned mode (SMR/ZBC/ZNS friendly allocation mode), first working version with limitations
    分区模式(SMR/ZBC/ZNS 友好分配模式),带限制的首个工作版本

  • misc performance improvements

    • flushing and ticket space reservations

    • preemptive background flushing

    • less lock contention for delayed refs

    • dbench-like workload (+7% throughput, -20% latency)
      类似 dbench 的工作负载(吞吐量 +7%,延迟 -20)

Core changes: 核心变化:

  • subpage block size support peparations

Fixes: 修复:

  • swapfile fixes (vs scrub, activation vs snapshot creation)

5.13 (Jun 2021) 5.13 (2021 年 6 月) 

Pull requests: v5.13-rc1, v5.13-rc2, v5.13-rc2, v5.13-rc3, v5.13-rc3, v5.13-rc5, v5.13-rc6, v5.13-rc7
拉取请求: v5.13-rc1, v5.13-rc2, v5.13-rc2, v5.13-rc3, v5.13-rc3, v5.13-rc5, v5.13-rc6, v5.13-rc7

User visible improvements

  • readahead for send, improving run time of full send by 10% and for incremental by 25%
    发送预读,将完整发送的运行时间缩短 10%,将增量发送的运行时间缩短 25

  • make reflinks respect O_SYNC, O_DSYNC and S_SYNC flags
    使重新链接尊重 O_SYNC、O_DSYNC 和 S_SYNC 标志

  • export supported sectorsize values in sysfs (currently only page size, more once full subpage support lands)
    在 sysfs 中导出支持的扇区大小值(目前仅支持页面大小,一旦全面支持子页面,将导出更多扇区大小值)

  • more graceful errors and warnings on 32bit systems when logical addresses for metadata reach the limit posed by unsigned long in page::index
    当元数据的逻辑地址达到 page::index 中无符号 long 的限制时,在 32 位系统上会出现更优雅的错误和警告。

    • error: fail mount if there’s a metadata block beyond the limit

    • error: new metadata block would be at unreachable address

    • warn when 5/8th of the limit is reached, for 4K page systems it’s 10T, for 64K page it’s 160T
      当达到上限的 5/8 时发出警告,对于 4K 页系统为 10T,对于 64K 页系统为 160T

  • zoned mode 分区模式

    • relocated zones get reset at the end instead of discard

    • automatic background reclaim of zones that have 75%+ of unusable space, the threshold is tunable in sysfs
      后台自动回收 75% 以上不可用空间的区域,阈值可在 sysfs 中调整

Fixes 修复

  • fix inefficient preemptive reclaim calculations

  • fix exhaustion of the system chunk array due to concurrent allocations

  • fix fallback to no compression when racing with remount

  • fix unmountable seed device after fstrim
    修复 fstrim 后无法挂载的种子设备

  • fix fiemap to print extents that could get misreported due to internal extent splitting and logical merging for fiemap output
    修复了 fiemap 输出中由于内部范围分割和逻辑合并而可能导致误报的 extents 打印问题

  • preemptive fix for dm-crypt on zoned device that does not properly advertise zoned support
    对分区设备上的 dm-crypt 进行抢先修复,因为该设备未正确宣传分区支持

Core changes 核心变化

  • add inode lock to synchronize mmap and other block updates (e.g. deduplication, fallocate, fsync)
    添加节点锁,以同步 mmap 和其他块更新(如重复数据删除、 fallocate、fsync)

  • subpage support update: metadata changes now support read and write

  • error handling through out relocation call paths

  • many other cleanups and code simplifications

5.14 (Aug 2021) 5.14 (2021 年 8 月) 

Pull requests: v5.14-rc1, v5.14-rc2, v5.14-rc3, v5.14-rc4, v5.14-rc7, v5.14
拉取请求: v5.14-rc1, v5.14-rc2, v5.14-rc3, v5.14-rc4, v5.14-rc7, v5.14

Hilights: 希莱斯

  • new sysfs knob to limit scrub IO bandwidth per device
    新的 sysfs 旋钮可限制每个设备的擦除 IO 带宽

  • device stats are also available in /sys/fs/btrfs/FSID/devinfo/DEVID/error_stats
    设备统计信息也可在 /sys/fs/btrfs/FSID/devinfo/DEVID/error_stats 中查看

  • support cancellable resize and device delete ioctls
    支持可取消的调整大小和设备删除 ioctls

  • change how the empty value is interpreted when setting a property, so far we have only ‘btrfs.compression’ and we need to distinguish a reset to defaults and setting “do not compress”, in general the empty value will always mean ‘reset to defaults’ for any other property, for compression it’s either ‘no’ or ‘none’ to forbid compression
    更改设置属性时对空值的解释,目前我们只有 "btrfs.compression",我们需要区分重置为默认值和设置 "不压缩",一般来说,对于其他属性,空值总是意味着 "重置为默认值",而对于压缩属性,"no "或 "none "表示禁止压缩。

  • performance improvements (xattrs, truncate)

  • space handling improvements, preemptive flushing

  • more subpage support preparation

5.15 (Nov 2021) 5.15 (2021 年 11 月) 

Pull requests: v5.15-rc1, v5.15-rc1, v5.15-rc3, v5.15-rc6, v5.15
拉取请求: v5.15-rc1, v5.15-rc1, v5.15-rc3, v5.15-rc6, v5.15

Features: 特点

  • fs-verity support, using standard ioctls, backward compatible with read-only limitation on inodes with previously enabled fs-verity

  • idmapped mount support 支持 idmapped 挂载

  • make mount with rescue=ibadroots more tolerant to partially damaged trees

  • allow raid0 on a single device and raid10 on two devices, degenerate cases but might be useful as an intermediate step during conversion to other profiles
    允许在单台设备上使用 raid0,在两台设备上使用 raid10,这些都是退化情况,但在转换为其他配置文件时,作为中间步骤可能会有用

  • zoned mode block group auto reclaim can be disabled via sysfs knob
    可通过 sysfs 开关禁用分区模式块组自动回收功能

Performance improvements:

  • continue readahead of node siblings even if target node is in memory, could speed up full send (on sample test +11%)
    即使目标节点在内存中,也会继续提前读取节点同级节点,从而加快完全发送的速度(在样本测试中 +11)

  • batching of delayed items can speed up creating many files

  • fsync/tree-log speedups fsync/tree-log 加速

    • avoid unnecessary work (gains +2% throughput, -2% run time on sample load)
      避免不必要的工作(提高 +2% 的吞吐量,减少 -2% 的样本负载运行时间)

    • reduced lock contention on renames (on dbench +4% throughput, up to -30% latency)
      减少了重命名时的锁争用(在 dbench 上,吞吐量提高了 4%,延迟降低了 30)

Fixes: 修复:

  • various zoned mode fixes 各种分区模式修复

  • preemptive flushing threshold tuning, avoid excessive work on almost full filesystems

Core: 核心:

  • continued subpage support, preparation for implementing remaining features like compression and defragmentation; with some limitations, write is now enabled on 64K page systems with 4K sectors, still considered experimental
    继续支持子页面,为实现压缩和碎片整理等其余功能做准备;在某些限制条件下,64K 页面和 4K 扇区的系统现在可以写入,但仍被认为是试验性的

    • no readahead on compressed reads

    • inline extents disabled 禁用内联扩展

    • disabled raid56 profile conversion and mount
      禁用 RAID56 配置文件转换和安装

  • improved flushing logic, fixing early ENOSPC on some workloads
    改进了刷新逻辑,修复了某些工作负载上的早期 ENOSPC 问题

  • inode flags have been internally split to read-only and read-write incompat bit parts, used by fs-verity
    inode 标志被内部拆分为只读和可读写的不兼容位,由 fs-verity 使用

  • new tree items for fs-verity: descriptor item, Merkle tree item

  • inode operations extended to be namespace-aware

  • cleanups and refactoring 清理和重构

5.16 (Jan 2022) 5.16 (2022 年 1 月) 

Pull requests: v5.16-rc1, v5.16-rc1, v5.16-rc2, v5.16-rc3, v5.16-rc5, v5.16-rc6
拉取请求: v5.16-rc1, v5.16-rc1, v5.16-rc2, v5.16-rc3, v5.16-rc5, v5.16-rc6

Related projects: kernel port of zstd 1.4.10 also [ released] in 5.16
相关项目: zstd 1.4.10 的内核移植也 [ released] in 5.16

Performance related: 与性能有关:

  • misc small inode logging improvements (+3% throughput, -11% latency on sample dbench workload)
    少量节点日志记录改进(在示例 dbench 工作负载上吞吐量提高 3%,延迟降低 11)

  • more efficient directory logging: bulk item insertion, less tree searches and locking

  • speed up bulk insertion of items into a b-tree, which is used when logging directories, when running delayed items for directories (fsync and transaction commits) and when running the slow path (full sync) of an fsync (bulk creation run time -4%, deletion -12%)
    加快向 b 树批量插入项目的速度,在记录目录、运行目录延迟项目(fsync 和事务提交)以及运行 fsync 的慢速路径(完全同步)时使用(批量创建运行时间 -4%,删除 -12%)。

Core: 核心:

  • continued subpage support

    • make defragmentation work

    • make compression write work

  • zoned mode 分区模式

    • support ZNS (zoned namespaces), zone capacity is number of usable blocks in each zone
      支持 ZNS(分区命名空间),分区容量是指每个分区中可用区块的数量

    • add dedicated block group (zoned) for relocation, to prevent out of order writes in some cases

    • greedy block group reclaim, pick the ones with least usable space first

  • preparatory work for send protocol updates

  • error handling improvements

  • cleanups and refactoring 清理和重构

5.17 (Mar 2022) 5.17 (2022 年 3 月) 

Pull requests: v5.17-rc1, v5.17-rc2, v5.17-rc3, v5.17-rc5, v5.17-rc6, v5.17-rc7
拉取请求: v5.17-rc1, v5.17-rc2, v5.17-rc3, v5.17-rc5, v5.17-rc6, v5.17-rc7

Features: 特点

  • make send work with concurrent block group relocation

  • new exclusive operation ‘balance paused’ to allow adding a device to filesystem with paused balance
    新的排他性操作 "暂停平衡",允许在暂停平衡的文件系统中添加设备

  • new sysfs file for fsid stored in the per-device directory to help distinguish devices when seeding is enabled
    新增 sysfs 文件,用于在每个设备目录中存储 fsid,以帮助在启用播种时区分设备

Performance: 性能:

  • less metadata needed for directory logging, directory deletion is 20-40% faster
    目录记录所需的元数据更少,目录删除速度提高 20-40

  • in zoned mode, cache zone information during mount to speed up repeated queries (about 50% speedup)
    在分区模式下,在挂载过程中缓存分区信息,以加快重复查询的速度(约 50%)。

  • free space tree entries get indexed and searched by size (latency -30%, search run time -30%)
    按大小对自由空间树条目进行索引和搜索(延迟 -30%,搜索运行时间 -30)

  • less contention in tree node locking when inserting a key and no splits are needed (files/sec in fsmark improves by 1-20%)
    在插入键时,减少树节点锁定的竞争,且无需拆分(fsmark 中的文件/秒速度提高了 1-20)

Fixes: 修复:

  • defrag rewrite from 5.16 fixed
    修复了 5.16 版的碎片重写问题

  • get rid of warning when mounted with flushoncommit
    在使用 flushoncommit 安装时消除警告

Core: 核心:

  • global reserve stealing got simplified and cleaned up in evict

  • more preparatory work for extent tree v2
    程度树 V2 的更多准备工作

  • remove readahead framework

  • error handling improvements

  • for other changes see the [ pull request]
    其他更改请参见 [ pull request] 。

5.18 (May 2022) 5.18 (2022 年 5 月) 

Pull requests: v5.18-rc1, v5.18-rc2, v5.18-rc3, v5.18-rc5, v5.18-rc6, v5.18-rc6
拉取请求: v5.18-rc1, v5.18-rc2, v5.18-rc3, v5.18-rc5, v5.18-rc6, v5.18-rc6

  • encoded read/write ioctls, allows user space to read or write raw data directly to extents (now compressed, encrypted in the future), will be used by send/receive v2 where it saves processing time
    已编码的读/写 ioctls,允许用户空间直接读取或写入扩展的原始数据(现在是压缩的,将来是加密的),将用于发送/接收 v2,以节省处理时间

  • zoned mode now works with metadata DUP (the mkfs.btrfs default)
    分区模式现在可与元数据 DUP(mkfs.btrfs 默认设置)一起使用

  • allow reflinks/deduplication from two different mounts of the same filesystem

  • error message header updates:

    • print error state: transaction abort, other error, log tree errors

    • print transient filesystem state: remount, device replace, ignored checksum verifications

  • tree-checker: verify the transaction id of the to-be-written dirty extent buffer
    tree-checker:验证待写入 dirty extent 缓冲区的事务 ID

  • fsync speedups fsync 加速

    • directory logging speedups (up to -90% run time)
      目录记录加速(运行时间最多可缩短 -90)

    • avoid logging all directory changes during renames (up to -60% run time)
      避免在重命名时记录所有目录更改(运行时间最多可减少 60)

    • avoid inode logging during rename and link when possible (up to -60% run time)
      尽可能避免在重命名和链接过程中记录节点日志(最多可节省 60% 的运行时间)

    • prepare extents to be logged before locking a log tree path (throughput +7%)
      在锁定日志树路径前准备要记录的扩展(吞吐量提高 7)

    • stop copying old file extents when doing a full fsync ()
      在执行完全同步时停止复制旧文件扩展名 ()

    • improved logging of old extents after truncate

  • remove balance v1 ioctl, superseded by v2 in 2012
    移除余额 V1 ioctl,2012 年被 V2 取代

Core, fixes: 核心,固定:

  • continued extent tree v2 preparatory work
    继续开展范围树 V2 的筹备工作

    • disable features that won’t work yet

    • add wrappers and abstractions for new tree roots

  • prevent deleting subvolume with active swapfile
    防止删除有活动 swapfile 的子卷

  • remove device count in superblock and its item in one transaction so they cant’t get out of sync

  • for subpage, force the free space v2 mount to avoid a warning and make it easy to switch a filesystem on different page size systems
    对于子页面,强制使用可用空间 v2 挂载,以避免警告,并方便在不同页面大小的系统上切换文件系统

  • export sysfs status of exclusive operation ‘balance paused’, so the user space tools can recognize it and allow adding a device with paused balance
    导出 sysfs 独占操作 "余额暂停 "的状态,以便用户空间工具能够识别它,并允许添加余额暂停的设备

5.19 (Jul 2022) 5.19 (2022 年 7 月) 

Pull requests: v5.19-rc1, v5.19-rc4, v5.19-rc4, v5.19-rc7, v5.19-rc7
拉取请求: v5.19-rc1, v5.19-rc4, v5.19-rc4, v5.19-rc7, v5.19-rc7

Features: 特点

  • subpage: 子页面:

    • support on PAGE_SIZE > 4K (previously only 64K)
      支持 PAGE_SIZE > 4K(以前仅支持 64K)。

    • make it work with raid56
      使其与 raid56 兼容

    • prevent remount with v1 space cache
      使用 v1 空间缓存防止重新挂载

  • repair super block num_devices automatically if it does not match the number of device items
    如果超级数据块 num_devices 与设备项目数不符,则自动修复

  • defrag can convert inline extents to regular extents, up to now inline files were skipped but the setting of mount option max_inline could affect the decision logic
    到目前为止,内联文件会被跳过,但挂载选项 max_inline 的设置可能会影响决策逻辑。

  • zoned: 区划:

    • minimal accepted zone size is explicitly set to 4MiB
      可接受的最小区域大小明确设置为 4MiB

    • make zone reclaim less aggressive and don’t reclaim if there are enough free zones

    • add per-profile sysfs tunable of the reclaim threshold
      为每个文件添加 sysfs 可调整回收阈值

  • allow automatic block group reclaim for non-zoned filesystems, with sysfs tunables
    允许使用 sysfs 可调参数自动回收非分区文件系统的块组

  • tree-checker: new check, compare extent buffer owner against owner rootid
    tree-checker:新检查,将范围缓冲区所有者与所有者 rootid 进行比较

Performance: 性能:

  • avoid blocking on space reservation when doing nowait direct io writes, (+7% throughput for reads and writes)
    在进行 nowait 直接 io 写入时,避免空间预留阻塞(读写吞吐量提高 7)

  • NOCOW write throughput improvement due to refined locking (+3%)
    NOCOW 写入吞吐量的提高得益于精细锁定 (+3%)

  • send: reduce pressure to page cache by dropping extent pages right after they’re processed


4.0 (Apr 2015) 4.0 (2015 年 4 月) 

  • file creation time is stored (no easy interface to read it yet)

  • fsync and log replay fixes
    fsync 和日志重放修复

  • lots of cleanups and other fixes

4.1 (Jun 2015) 4.1 (2015 年 6 月) 

Fixes: 修复:

  • regression in chunk removal, conversion to raid1 possible again
    大块移除中的倒退,再次转换为 raid1 的可能性

  • log tree corruption fix with ‘’-o discard’’ mount
    使用"-o discard "挂载修复日志树损坏问题

  • bare xattr namespace attribute is not accepted
    不接受裸 xattr 命名空间属性

  • orphan cleanup is started for implicitly mounted default subvolume

  • send fixes 发送修正

  • cloning within same file 在同一文件内克隆

  • EXTENT_SAME ioctl infinite loop fix
    EXTENT_SAME ioctl 无限循环修复程序

  • avoid more ENOSPC in delayed-iput context
    避免在延迟输出上下文中出现更多 ENOSPC

  • a few ENOMEM fixes 一些 ENOMEM 修正

  • ‘automatic empty block group removal’ fixups
    自动移除空区块组 "修正

Speedups: 加速:

  • large file deletion: run delayed refs more often

  • large file deletion: don’t build up too much work from crc
    删除大文件:不要积累过多的 CRC 工作

  • transaction commit latency improved

  • block group cache writeout

Qgroup: Qgroup:

  • limits are shared upon snapshot

  • allow to remove qgroup which has parent but no child
    允许删除有父但无子的 qgroup

  • fix status of qgroup consistency after rescan
    修复重新扫描后 qgroup 一致性的状态

  • fix quota status bits after dsiabling
    修复 DSI 禁用后的配额状态位

  • mark qgroups inconsistent after assign/delete actions
    在分配/删除操作后标记不一致的 q 组

  • code cleanups 代码清理

4.2 (Aug 2015) 4.2 (2015 年 8 月) 

Enhancements: 增强功能:

  • transaction abort now reports the caller, not the helper function

  • INO_LOOKUP ioctl: unprivileged if used to just get the rootid (aka. subvolume id)
    INO_LOOKUP ioctl:如果仅用于获取 rootid(又称子卷 ID),则不具有权限

  • unified ‘’subvol=’’ and ‘’subvolid=’’ mounting, show the mounted subvol in mount options; also, ‘’/proc/self/mountinfo’’ now always correctly shows the mounted subvolume

  • reworked internal qgroup logic
    重新设计的 qgroup 内部逻辑

  • send: use received_uuid of parent during send
    发送:发送时使用父节点的 received_uuid

  • sysfs: preparatory works for exporting more stats about devices

  • deduplication on the same inode works

  • deduplication does not change mtime/ctime
    重复数据删除不会更改 mtime/ctime

Fixes: 修复:

  • in send: cloning, renames, orphans

  • few more ENOSPC fixes in case of block group creation/removal
    在创建/删除区块组时,对 ENOSPC 进行了更多修复

  • fix hang during inode eviction due to concurrent readahead
    修复因并发超前读取而导致的 inode eviction 时的挂起问题

  • EXTENT_SAME ioctl: handle unaligned length
    EXTENT_SAME ioctl:处理未对齐长度

  • more fixes around automatic block group removal

  • deadlock with EXTENT_SAME and readahead
    使用 EXTENT_SAME 和 readahead 时出现死锁

  • for feature NO_HOLES: fsync, truncate
    针对特征 NO_HOLES:fsync、truncate

4.3 (Nov 2015) 4.3 (2015 年 11 月) 

  • fix raid56 rebuild with missing device
    修复 RAID56 重建时丢失设备的问题

  • discard ioctl will return the number of bytes
    丢弃 ioctl 将返回字节数

  • more bugfixes and cleanups

4.4 (Jan 2016) 4.4 (2016 年 1 月) 

  • send fixes: cloning, sending with parent

  • improved handling of framgented space using bitmaps

  • new mount option for debugging: fragment=data|metadata|all

  • updated balance filters: limit, stripes, usage

  • more bugfixes and cleanups

4.5 (Mar 2016) 4.5 (2016 年 3 月) 

  • free space cache v2: an incompat feature to track the free space cache as a b-tree
    空闲空间缓存 v2:以 b 树形式跟踪空闲空间缓存的不兼容功能

  • balance: - ‘-dconvert=dup’ supported - continue but warn if metadata have lower redundancy than data
    平衡:- 支持"-dconvert=dup"- 继续,但如果元数据的冗余度低于数据,则发出警告

  • fix: trim does not overwrite bootloader area (introduced in 4.3, fixed in 4.4.x stable kernels)
    修正:修剪不会覆盖引导加载程序区域(4.3 中引入,4.4.x 稳定版内核中已修正)

  • assorted bugfixes, improvements or cleanups

4.6 (May 2016) 4.6 (2016 年 5 月) 

  • mount options: 安装选项:

    • usebackuproot - replace ‘recovery’ (works but is deprecated)
      usebackuproot - 替换 "recovery"(有效,但已废弃)

    • logreplay, nologreplay - disable log replay at mount time, does no writes to the device
      logreplay, nologreplay - 在挂载时禁用日志重放,不向设备写入内容

    • norecovery - synthetic option to disable recovery at mount time and disable writes (now does: nologreplay)
      norecovery - 用于在挂载时禁用恢复和禁用写入的合成选项(现在使用:nologreplay)

  • default inline limit is now 2048 (instead of page size, usually 4096)
    默认内联限制现在为 2048(而不是页面大小,通常为 4096)

  • /dev/btrfs-control now understands the GET_SUPPORTE_FEATURES ioctl
    /dev/btrfs-control 现在能理解 GET_SUPPORTE_FEATURES ioctl 了

  • get rid of harmless message “’’could not find root %llu’’”
    删除无害信息"''找不到 %llu 根目录''"

  • preparatory work for subpage-blocksize patchset

  • fix bug when using overlayfs
    修复使用 overlayfs 时的错误

  • fixes in readahead, log replay, fsync, and more
    readahead、日志重放、fsync 等修复

4.7 (Jul 2016) 4.7 (2016 年 7 月) 

  • allow balancing to dup with multi-device

  • device deletion by id (additionally to by path)
    按 ID 删除设备(除按路径外)

  • renameat2: add support for RENAME_EXCHANGE and RENAME_WHITEOUT

  • enhanced selftests 强化自测

  • more preparatory work for “blocksize < page size”
    为 "块大小 < 页面大小 "做更多准备工作

  • more validation checks of superblock (discovered by fuzzing)

  • advertise which crc32c implementation is being used at module load
    在模块加载时提示使用哪个 crc32c 实现

  • fixed space report by ‘’df’’ with mixed block groups

  • log replay fixes 日志重放修复

  • device replace fixes 设备更换修复

4.8 (Oct 2016) 4.8 (2016 年 10 月) 

  • space reservations and handling uses ticketed system, this should improve latency and fairness in case when there are several threads blocked on flushing

  • fixes of bugs triggered by fuzzed images

  • global ratelmit of all printed messages

  • several send, qgroup fixes
    数次发送,qgroup 修复

  • cleanups 清理

4.9 (Dec 2016) 4.9 (2016 年 12 月) 

  • improved performance of extent sharing detection in FIEMAP
    提高了 FIEMAP 中范围共享检测的性能

Fixes: 修复:

  • device delete hang at the end of the operation

  • free space tree bitmap endianity fixed on big-endian machines

  • parallel incremental send and balance issue fixed

  • cloning ioctl can be interrupted by a fatal signal
    克隆 ioctl 可被致命信号中断

  • other stability fixes or cleanups

4.10 (Feb 2017) 4.10 (2017 年 2 月) 

  • balance: human readable block group descripion in the log

  • balance: fix storing of stripes_min, stripes_max filters to the on-disk item
    平衡:修复将 stripes_min、 stripes_max 过滤器存储到磁盘项目中的问题

  • qgroup: fix accounting bug during concurrent balance run
    qgroup: 修复并行平衡运行时的会计错误

  • better worker thread resource limit checks

  • fix ENOSPC during hole punching
    在打孔时修复 ENOSPC

  • fix ENOSPC when reflinking a heavily fragmented file
    修复重新链接碎片严重的文件时的 ENOSPC 问题

  • fix crash when certain tracepoints are enabled

  • fix compat ioctl calls on non-compat systems
    修复非兼容系统上的兼容 ioctl 调用

  • improved delayed ref iteration performance

  • many cleanups 多次清理

4.11 (May 2017) 4.11 (2017 年 5 月) 

  • mostly a cleanup release 主要是清理释放

  • improved csum mismatch messages
    改进的 csum 不匹配信息

  • move some qgroup work out of transaction commit
    将一些 qgroup 工作移出事务提交

  • let unlink temporarily exceed quotas

  • fix truncate and lockless DIO writes
    修复截断和无锁定 DIO 写入问题

  • incremental send fixes 增量发送修复

  • fix remount using ssd and nossd combinations
    修复使用 ssd 和 nossd 组合重挂载的问题

4.12 (Jul 2017) 4.12 (2017 年 7 月) 

  • new tracepoints: file item

  • fix qgoup accounting when inode_cache is in use
    修复使用 inode_cache 时的 qgoup 会计问题

  • fix incorrect number report in stat::t_blocks under certain conditions
    修正 stat::t_blocks 在某些情况下的错误数字报告

  • raid56 fixes: raid56 修复:

    • enable auto-repair during read (ie. similar to what raid1 and raid10 do)
      在读取过程中启用自动修复功能(即类似于 raid1 和 raid10 的功能)

    • fix potential crash with concurrent scrub and dev-replace

    • fix potential crash when cancelling dev-replace
      修复取消 dev-replace 时可能出现的崩溃

    • fix false reports during scrub when it’s possible to do repair

    • fix wrong mirror report during repair

  • many cleanups 多次清理

4.13 (Sep 2017) 4.13 (2017 年 9 月) 

  • deprecated: mount option ‘’alloc_start’’

  • qgroups: new sysctl to allow temporary quota override with CAP_SYS_RESOURCE
    qgroups:新的 sysctl,允许使用 CAP_SYS_RESOURCE 覆盖临时配额

  • statx syscall support statx 系统调用支持

  • nowait AIO support nowait AIO 支持

  • lots of cleanups around bio processing and error handling

  • memory allocation constraint cleanups and improvements

  • more sanity checks (for dir_item)
    更多正确性检查(针对 dir_item)

  • compression will be skipped if there’s no improvement (at least one block)

  • fix invalid extent maps due to hole punching

  • fix: sgid not cleared when changing acls
    修正:更改 acls 时未清除 sgid

  • some enospc corner case fixes
    一些 enospc 角情况修复

  • send fixes 发送修正

  • other cleanups 其他清理工作

4.14 (Nov 2017) 4.14 (2017 年 11 月) 

  • added zstd compression 添加了 zstd 压缩

  • fine-grained check for degraded mount (verify raid constraints on chunk level, not device level)
    对已降级的挂载进行细粒度检查(在块级而非设备级验证 raid 限制)

  • userspace transaction ioctl has been deprecated, scheduled for removal in 4.17
    用户空间事务 ioctl 已被弃用,计划在 4.17 中移除

  • foundation code for compression heuristics

  • mount option ‘ssd’ does not force block allocation alignments
    挂载选项 "ssd "不强制块分配对齐

Fixes: 修复:

  • potential raid repair and compression crash

  • prevent to set invalid default subvolid

  • resume qgroup rescan on rw remount
    在 rw 重挂载时恢复 qgroup 重新扫描

  • better reporting of detected checksum mismatches for DIO
    更好地报告检测到的 DIO 校验和不匹配情况

  • compression for defrag vs per-file behaves as expected, respecting the requested value

  • possible deadlock with readdir and pagefault
    readdir 和 pagefault 可能造成死锁

  • emission of invalid clone operations in send

  • cleanups and refactoring 清理和重构

4.15 (Jan 2018) 4.15 (2018 年 1 月) 

New features: 新功能

  • extend mount options to specify zlib compression level, <i>-o compress=zlib:9</i>
    扩展挂载选项以指定 zlib 压缩级别,<i>-o compress=zlib:9</i>

  • v2 of ioctl “extent to inode mapping”
    ioctl "范围到 inode 映射 "的第 2 版

  • populate compression heuristics logic

  • enable indexing for btrfs as lower filesystem in overlayfs
    在 overlayfs 中启用 btrfs 作为下层文件系统的索引功能

  • speedup page cache readahead during send on large files

Internal changes: 内部变化:

  • more sanity checks of b-tree items when reading them from disk
    从磁盘读取 b 树项时,对其进行更多的正确性检查

  • more EINVAL/EUCLEAN fixups, missing BLK_STS_* conversion, other errno or error handling fixes
    更多 EINVAL/EUCLEAN 修正、缺少 BLK_STS_* 转换、其他 errno 或错误处理修正

  • remove some homegrown IO-related logic, that’s been obsoleted by core block layer changes (batching, plug/unplug, own counters)
    删除一些自制的 IO 相关逻辑,这些逻辑已被核心代码块层的变化(批处理、插拔、自有计数器)所淘汰

  • add ref-verify, optional debugging feature to verify extent reference accounting
    添加 ref-verify,可选调试功能,用于验证范围引用核算

  • simplify code handling outstanding extents, make it more clear where and how the accounting is done

  • make delalloc reservations per-inode, simplify the code and make the logic more straightforward
    按节点保留 delalloc,简化代码,使逻辑更简单明了

  • extensive cleanup of delayed refs code

  • fix send ioctl on 32bit with 64bit kernel
    修复使用 64 位内核在 32 位上发送 ioctl 的问题

4.16 (Apr 2018) 4.16 (2018 年 4 月) 

  • fallocate: implement zero range mode
    fallocate: 实现零范围模式

  • avoid losing data raid profile when deleting a device
    删除设备时避免丢失数据 raid 配置文件

  • tree item checker: more checks for directory items and xattrs
    树项检查器:对目录项和 xattrs 进行更多检查

  • raid56 recovery: don’t use cached stripes, that could be potentially changed and a later RMW or recovery would lead to corruptions or failures
    raid56 恢复:不要使用缓存条带,缓存条带有可能被更改,稍后的 RMW 或恢复将导致损坏或故障

  • let raid56 try harder to rebuild damaged data, reading from all stripes if necessary
    让 raid56 更努力地重建损坏的数据,必要时从所有磁条读取数据

  • fix scrub to repair raid56 in a similar way as in the case above
    fix scrub 以修复 raid56,方法与上述情况类似

  • cleanups: device freeing, removed some call indirections, redundant bio_put/_get, unused parameters, refactorings and renames
    清理:设备释放,删除一些间接调用、多余的 bio_put/_get、未使用的参数,重构和重命名

  • RCU list traversal fixups
    RCU 列表遍历修复

  • simplify mount callchain, remove recursing back when mounting a subvolume

  • plug for fsync, may improve bio merging on multiple devices
    fsync 插件,可改进多个设备上的生物合并工作

  • compression heuristic: replace heap sort with radix sort, gains some performance

  • add extent map selftests, buffered write vs dio

  • see [ pull request]
    参见 [ pull request]

4.17 (Jun 2018) 4.17 (2018 年 6 月) 

  • mount options: new nossd_spread; subvolid will detect junk after the number and fail the mount
    挂载选项:new nossd_spread;subvolid 会检测到数字后的垃圾信息,并导致挂载失败

  • add message after cancelled device replace

  • direct module dependency on libcrc32, removed own crc wrappers
    直接依赖 libcrc32 模块,移除自己的 crc 封装程序

  • removed user space transaction ioctls
    删除了用户空间交易 ioctls

  • use lighter locking when reading /proc/self/mounts (RCU)
    读取 /proc/self/mounts 时使用更轻的锁定(RCU)

  • skip writeback of last page when truncating file to same size

  • send: do not issue unnecessary truncate operations

  • selftests: more tree block validation

  • fix fsync after hole punching when using no-holes feature

  • raid56: raid56:

    • make sure target is identical to source when raid56 rebuild fails after dev-replace
      在 dev-replace 失败后重建 raid56 时,确保目标与源完全相同

    • faster rebuild during scrub, batch by stripes and not block-by-block

    • make more use of cached data when rebuilding from a missing device

  • [ pull request]

4.18 (Aug 2018) 4.18 (2018 年 8 月) 

  • added support for the ioctl FS_IOC_FSGETXATTR, per-inode flags, successor of GET/SETFLAGS; now supports only existing flags: append, immutable, noatime, nodump, sync
    添加了对 ioctl FS_IOC_FSGETXATTR 的支持,这是 GET/SETFLAGS 的后继版本,支持每个节点的标志;现在仅支持现有标志:附加、不可变、无时间、Nodump、同步

  • 3 new unprivileged ioctls to allow users to enumerate subvolumes
    新增 3 个非特权 ioctls,允许用户枚举子卷

  • dedupe syscall implementation does not restrict the range to 16MiB, though it still splits the whole range to 16MiB chunks
    dedupe syscall 实现不会将范围限制在 16MiB,但仍会将整个范围分割为 16MiB 块

  • on user demand, rmdir() is able to delete an empty subvolume, export the capability in sysfs
    根据用户需求,rmdir() 能够删除空子卷,并在 sysfs 中导出该功能。

  • fix inode number types in tracepoints, other cleanups

  • send: improved speed when dealing with a large removed directory, measurements show decrease from 2000 minutes to 2 minutes on a directory with 2 million entries
    发送:提高了处理大型删除目录的速度,测量结果表明,处理 200 万条目目录的速度从 2000 分钟降至 2 分钟

  • pre-commit check of superblock to detect a mysterious in-memory corruption

  • log message updates 日志信息更新

  • [ pull request]

4.19 (Oct 2018) 4.19 (2018 年 10 月) 

Hilights, no big changes in this releaase:

  • allow defrag on opened read-only files that have rw permissions
    允许对已打开的具有 rw 权限的只读文件进行碎片整理

  • tree checker improvements, reported by fuzzing

  • send, fix incorrect file layout after hole punching beyond eof
    发送,修复打孔超出 Eof 后不正确的文件布局

  • reset on-disk device stats value after replace

  • assorted fixes, cleanups and dead code removal

  • [ pull request]

4.20 (Dec 2018) 4.20 (2018年12月) 

Performance improvements:

  • fewer wakeups and blocking during b-tree traversals, improved latencies and scalability
    减少 b 树遍历过程中的唤醒和阻塞,改善延迟和可扩展性

  • qgroups: 30+% run time improvement during balance, no accounting on unchanged subtrees (continued)
    qgroups:平衡过程中运行时间缩短 30%以上,不对不变子树进行核算(续)

  • use a cached variant of rb-tree, speeds up traversal in some cases
    使用 rb-tree 的缓存变体,在某些情况下可加快遍历速度

Fixes: 修复:

  • trim: 修剪:

    • could miss some block groups, if logical offset was too high and did not fit the range

    • better error reporting, continue as far as possible

    • less interaction with transaction commit

  • fsync: fix log replay and O_TMPFILE warnings
    fsync:修复日志重放和 O_TMPFILE 警告

  • qgroups: fix rescan that might misc some dirty groups

  • don’t clean dirty pages during buffered writes, this could lead to lost updates in some corner cases

  • some block groups could have been delayed in creation, if the allocation triggered another one

  • error handling improvements

  • other cleanups and refactoring

  • [ pull request]


3.0 (Jul 2011) 3.0 (2011 年 7 月) 

  • Filesystem scrub 文件系统擦洗

  • Auto-defragmentation (autodefrag mount option)

  • Improved block allocator 改进的程序块分配器

  • Sped up file creation/deletion by delayed operation

3.1 (Oct 2011) 3.1 (2011 年 10 月) 

  • Stability fixes (lots of them, really), notably fixing early ENOSPC, improved handling of a few error paths and corner cases, fix for the crash during log replay.
    稳定性修复(真的有很多),特别是修复了早期的 ENOSPC,改进了对一些错误路径和角落情况的处理,修复了日志重放时崩溃的问题。

3.2 (Jan 2012) 3.2 (2012 年 1 月) 

  • Log of past roots to aid recovery (option ‘’recovery’’)
    记录过去的根以帮助恢复("恢复 "选项)

  • Subvolumes mountable by full path

  • Added ‘’nospace_cache’’ option

  • Lots of space accounting fixes

  • Improved scrub performance thanks to new read-ahead infrastructure

  • Scrub prints paths of corrupted files

  • ioctl for resolving logical->inode and inode->path
    用于解析 logical->inode 和 inode->path 的 ioctl

  • Integrated raid-repair (if possible)

  • Data corruption fix for parallel snapshot creation

  • Write barriers for multiple devices were fixed to be more resistant in case of power failure

3.3 (Mar 2012) 3.3 (2012 年 3 月) 

  • restriper - infrastructure to change btrfs raid profiles on the fly via balance
    restriper - 通过余额即时更改 btrfs raid 配置文件的基础架构

  • optional integrity checker infrastructure ([ details])
    可选的完整性检查器基础设施 ([ details])

  • fixed a few corner cases where TRIM did not process some blocks
    修正了 TRIM 无法处理某些区块的一些角落情况

  • cluster allocator improvements (less fragmentation, some speedups)

3.4 (May 2012) 3.4 (2012 年 5 月) 

  • Allow metadata blocks larger than the page size (4K). This allows metadata blocks up to 64KB in size. In practice 16K and 32K seem to work best. For workloads with lots of metadata, this cuts down the size of the extent allocation tree dramatically and fragments much less. (Chris Mason)
    允许元数据块大于页面大小(4K)。这允许元数据块的大小达到 64KB。在实践中,16K 和 32K 似乎效果最好。对于有大量元数据的工作负载,这将大大减少范围分配树的大小,并减少碎片。(克里斯-梅森)

  • Improved error handling (IO errors). This gives Btrfs the ability to abort transactions and go read-only on errors other than internal logic errors and ENOMEM more gracefully instead of crashing. (Jeff Mahoney)
    改进了错误处理(IO 错误)。这使 Btrfs 能够在出现内部逻辑错误和 ENOMEM 以外的错误时,更优雅地中止事务并转为只读,而不是崩溃。(杰夫-马霍尼)

  • Reworked the way in which metadata interacts with the page cache. page->private now points to the btrfs extent_buffer object, which makes everything faster. The code was changed so it now writes a whole extent buffer at a time instead of allowing individual pages to go down. It is now more aggressive about dropping pages for metadata blocks that were freed due to COW. Overall, metadata caching is much faster now. (Josef Bacik)
    重新设计了元数据与页面缓存的交互方式。page->private 现在指向 btrfs extent_buffer 对象,这让一切都变得更快。对代码进行了修改,现在一次写入整个 extent buffer,而不是允许单个页面下降。对于因 COW 而释放的元数据块,它现在会更积极地丢弃页面。总体而言,元数据缓存现在快多了。(Josef Bacik)

3.5 (Jun 2012) 3.5 (2012 年 6 月) 

  • collect device statistics (read/write failures, checksum errors, corrupted blocks)

  • integrity checker (3.3+) supports bigblocks (3.4+)
    完整性检查器(3.3 以上)支持 bigblocks(3.4 以上)

  • more friendly NFS support (native ‘’i_version’’)
    更友好的 NFS 支持(本地 "i_version)

  • ‘’thread_pool’’ mount option tunable via remount
    可通过重挂载调整 "thread_pool "挂载选项

  • ‘’fsync’’ speed improvements

  • several fixes related to read-only mounts

  • scrub thread priority lowered to idle

  • preparatory works for 3.6 features (‘’tree_mod_log’’)
    3.6 功能的准备工作(''tree_mod_log'')

3.6 (Sep 2012) 3.6 (2012 年 9 月) 

  • subvolume-aware quotas (‘’qgroups’’)

  • support for send/receive between snapshot changes ([ LWN article])
    支持快照更改之间的发送/接收([ LWN 文章])。

  • ‘’atime’’ is not updated on read-only snapshots ([ LWN article])
    只读快照上的''atime''不会更新 ([ LWN 文章])

  • allowed cross-subvolume file clone (aka. reflink)

  • remount with ‘’no’’ compression possible
    可以进行 "无 "压缩的重新安装

  • new ioctl to read device readiness status
    读取设备就绪状态的新 ioctl

  • speed improvement for concurrent multithreaded reads

3.7 (Dec 2012) 3.7 (2012 年 12 月) 

  • ‘’fsync’’ speedups fsync''加速

  • removed limitation of number of hardlinks in a single directory

  • file hole punching ([ LWN article])
    文件打孔 ([ LWN 文章])

  • per-file ‘’NOCOW’’ 每文件 "NOCOW

  • fixes to send/receive 固定发送/接收

3.8 (Feb 2013) 3.8 (2013 年 2 月) 

  • ability to replace devices at runtime in an effective way ([ description])
    在运行时以有效方式更换设备的能力 ([ description])

  • speed improvements (cumulative effect of many small improvements)

  • a few more bugfixes 更多错误修正

3.9 (Apr 2013) 3.9 (2013 年 4 月) 

  • preliminary Raid 5/6 support (details in the [ announcement])
    初步支持 Raid 5/6(详情请参见 [ 公告])。

  • snapshot-aware defrag 快照感知碎片整理

  • a mode of ‘’send’’ to avoid transferring file data
    发送 "模式,以避免传输文件数据

  • direct IO speedup ([ numbers])
    直接 IO 加速 ([ 数字])

  • new ‘’ioctl’’s to set/get filesystem label
    新的 "ioctl "用于设置/获取文件系统标签

  • defrag is cancellable 可取消碎片整理

3.10 (Jun 2013) 3.10 (2013 年 6 月) 

  • reduced size of metadata by so-called skinny extents []
    通过所谓的瘦扩展缩小元数据的大小 []

  • enhanced syslog message format []
    增强的系统日志信息格式 []

  • the mount option ‘’subvolrootid’’ is deprecated

  • lots of stability improvements, removed many< BUG_ONs
    大量稳定性改进,删除了许多< BUG_ONs

  • qgroups are automatically created when quotas are enabled []
    启用配额时会自动创建 qgroup []

  • qgroups are able to ‘’rescan’’ current filesystem and sync the quota state with the existing subvolumes
    qgroups 能够 "重新扫描 "当前文件系统,并将配额状态与现有子卷同步

  • enhanced ‘’send/recv ‘’ format for multiplexing more data into one stream []
    增强型 "发送/接收 "格式,可将更多数据复用为一个数据流[]

  • various unsorted code cleanups, minor performance updates

3.11 (Sep 2013)

  • extent cloning within one file

  • ioctl to wait for quota rescan completion
    ioctl 等待配额重新扫描完成

  • device deletion returns error code to userspace (not in syslog anymore)

  • usual load of small fixes and improvements

3.12 (Nov 2013) 3.12 (2013 年 11 月) 

  • Major performance improvement for send/receive with large numbers of subvolumes

  • Support for batch deduplication (userspace tools required)

  • new mount option ‘’commit’’ to set the commit interval

  • Lots of stability and bugfix patches

3.13 (Jan 2014) 3.13 (2014 年 1 月) 

  • ‘’fiemap’’ exports information about shared extents

  • bugfix and stability foucsed release

3.14 (Mar 2014) 3.14 (2014 年 3 月) 

  • optional incompat disk format improvement aiming at speedup, removing file hole representation, named ‘’no-holes’’
    可选的不兼容磁盘格式改进,旨在提高速度,删除文件孔表示,命名为 "无孔

  • ioctl to query/change feature bits (e.g. switching on extended refs on-line now possible)
    用于查询/更改功能位的 ioctl(例如,现在可以在联机时打开扩展引用)

  • export filesystem info through sysfs: features, allocation profiles
    通过 sysfs 导出文件系统信息:功能、分配配置文件

  • added pairing mount options (for remount)

  • heap of small performance optimizations

  • snapshot-aware defrag was disabled due to problems

3.15 (Jun 2014) 3.15 (2014 年 6 月) 

  • pile of ‘’send’’ fixes (stability, speed)

  • worker threads now use kernel workqueues

3.16 (Aug 2014) 3.16 (2014 年 8 月) 

  • ‘’O_TMPFILE’’ support []

  • reworked qgroup accounting, to fix negative numbers after subvol deletion
    重做了 qgroup 会计,以修正删除子卷后的负数

  • SEARCH_TREE ioctl v2, extended for retrieving more data []
    SEARCH_TREE ioctl v2,为检索更多数据而扩展 []

  • new balance filter ‘’limit’’ for more finegrained balancing []
    新的平衡过滤器"'limit'"可实现更精细的平衡 []

  • ioctl FS_INFO and it’s sysfs counterpart export information about ‘’nodesize’’, ‘’sectorsize’’ and ‘’clone_alignment’’
    ioctl FS_INFO 及其对应的 sysfs 输出有关 "节点大小"、"扇区大小 "和 "克隆对齐 "的信息

  • snapshots are protected during send

3.17 (Oct 2014) 3.17 (2014 年 10 月) 

3.17 (Oct 2014) 3.17 (2014 年 10 月) 

3.18 (Dec 2014) 3.18 (2014 年 12 月) 

3.19 (Feb 2015) 3.19 (2015 年 2 月) 

  • raid56 supports scrub and device replace
    raid56 支持擦除和设备替换


2.6.39 (May 2011) 2.6.39 (2011 年 5 月) 

Per-file compression and NOCOW control. Support for bulk TRIM on SSDs.
每文件压缩和 NOCOW 控制。支持 SSD 上的批量 TRIM。

2.6.38 (March 2011) 2.6.38 (2011 年 3 月) 

Added LZO compression method, FIEMAP bugfixes with delalloc, subvol flags get/set ioctl, allow compression during defrag.
添加了 LZO 压缩方法,修复了 FIEMAP 与 delalloc、subvol 标志 get/set ioctl 的错误,允许在碎片整理过程中进行压缩。

2.6.37 (January 2011) 2.6.37 (2011 年 1 月) 

On-disk free space cache, asynchronous snapshots, unprivileged subvolume deletion, extent buffer switches from a rbtree with spinlocks to a radix tree with RCU. (Explanations of these features are described in [ this] article [registration needed]).
磁盘可用空间缓存、异步快照、无特权子卷删除、从带自旋锁的 rbtree 到带 RCU 的 radix tree 的 extent buffer 切换([ this] 文章[需要注册]中介绍了这些功能)。

2.6.35 (August 2010)

Direct I/O support and -ENOSPC handling of volume management operations, completing the -ENOSPC support.

2.6.34 (May 2010)

Support for changing the default subvolume, a new userspace tool (btrfs), an ioctl that lists all subvolumes, an ioctl to allow improved df math, and other improvements.

2.6.33 (February 2010)

Some minor -ENOSPC improvements.

2.6.32 (December 2009)


Btrfs has not had serious -ENOSPC (“no space”) handling, the COW oriented design makes handling such situations more difficult than filesystems that just rewrite the blocks. In this release Josef Bacik (Red Hat) has added the necessary infrastructure to fix that problem. Note: The filesystem may run out of space and still show some free space. That space comes from a data/metadata chunk that can’t get filled because there’s not space left to create its metadata/data counterpart chunk. This is unrelated to the -ENOSPC handling and will be fixed in the future. Code: [ (commit)]

Proper snapshot and subvolume deletion

In the last btrfs-progs version you have options that allow to delete snapshots and subvolumes without having to use rm. This is much faster because it does the deletion via btree walking. It’s also now possible to rename snapshots and subvols. Work done by Yan Zheng (Oracle). Code: [ (commit 1)], [ 2)]

Performance improvements

Streaming writes on very fast hardware were previously CPU bound at around 400MB/s. Chris Mason (Oracle) has improved the code so that now it can push over 1GB/s while using the same CPU as XFS (factoring out checksums). There are also improvements for writing large portions of extents, and other workloads. Multidevice setups are also much faster due to the per-BDI writeback changes. The performance of fsync() was greatly improved, which fixed a severe slowdown while using yum in Fedora 11.

Support for “discard” operation on SSD devices

“Discard” support is a way to telling SSD devices which blocks are free so that the underlying firmware knows that it’s safe to do some optimizations [ (commit)], [ (commit)]


0.13 and older

  • Copy on write FS

  • Checksumming

  • Transactions

  • Snapshotting

  • Subvolumes

0.14 (April 30, 2008)

  • Support for multiple devices

  • raid0, raid1 and raid10, single spindle metadata duplication

0.15 (May 29, 2008)

  • Metadata back references

  • Online growing and shrinking

  • Conversion program from Ext3

  • data=ordered support

  • COW-free data writes.

  • focus on stability fixes for the multiple device code

0.16 (August 2008)

v0.16 does change the disk format from v0.15, and it includes a long list of performance and stability updates.

Fine grained Btree locking

Locking is now done in a top down fashion while searching the btree, and higher level locks are freed when they are no longer required. Extent allocations still have a coarse grained lock, but that will be improved in the next release.

Improved data=ordered

Ordered data mode loosely means any system that prevents garbage or stale data blocks after a crash. It was previously implemented the same way ext3 does it, which is to force pending data writes down before a transaction commits.

The data=ordered code was changed to only modify metadata in the btree after data extents are fully written on disk. This allows a transaction commit to proceed without waiting for all the data writes on the FS to finish.

A single fsync or synchronous write no longer forces all the dirty data on the FS to disk, as it does in ext3 and reiserfsv3.

Although it is not implemented yet, the new data=ordered code would allow atomic writes of almost any size to a single file to be exported to userland.

ACL support (Josef Bacik)

ACLs are implemented and enabled by default.

Lost file prevention (Josef Bacik)

The VFS and posix APIs force filesystems allow files to be unlinked from a directory before they are deleted from the FS. If the system crashes between the unlink and the deletion, the file is still consuming space on disk, but not listed in any directory.

Btrfs now tracks these files and makes sure they are reclaimed if the system crashes before they are fully deleted.

New directory index format (Josef Bacik)

Btrfs indexes directories in two ways. The first index allows fast name lookups, and the second is optimized to return inodes in something close to disk order for readdir. The second index is an important part of good performance for full filesystem backups.

A per-directory sequence number is now used for the second index, removing some worst case conditions around files that are hard linked into the same directory many times.

Faster unmount times (Yan Zheng)

Btrfs waits for old transactions to be completely removed from the FS before unmount finishes. A new reference count cache was added to make this much less IO intensive, improving FS performance in all workloads.

Improved streaming reads and writes

The new data=ordered code makes streaming writes much faster. Streaming reads are improved by tuning the thread pools used to process data checksums after the read is done. On machines with sufficient CPU power to keep up with the disks, data checksumming is able to run as fast as nodatasum mounts.

0.17 (January 2009)

Btrfs is now in 2.6.29-rc1!

v0.17 has a new disk format since v0.16. Future releases will try to maintain backwards compatibility with this new format.


Transparent zlib compression of file data is enabled by mount -o compress.

Improved block allocation routines (Josef Bacik)

Many performance problems in the allocator are addressed in this release

Improved block sharing while moving extents (Yan Zheng)

The btrfs-vol commands to add, remove and balance space across devices triggers a COW of metadata and data blocks. This release is much better at maintaining shared blocks between snapshots when that COW happens.

Seed Device support

It is now possible to create a filesystem to seed other Btrfs filesystems. The original filesystem and devices are included as a readonly starting point to the new FS. All modifications go onto different devices and the COW machinery makes sure the original is unchanged.

Many bug fixes and performance improvements

0.18 (January 2009)

v0.18 has the same disk format as 0.17, but a bug was found in the ioctl interface shared between 32 bit and 64 bit programs. This was fixed by changing the ioctl interface. Anyone using 2.6.29-rc2 will need to update to v0.18 of the btrfs progs.

There is no need to reformat though, the disk format is still compatible.

0.19 (June 2009)

v0.19 is a forward rolling format change, which means that it can read the v0.18 disk format but older kernels and older btrfs-progs code will not be able to read filesystems created with v0.19. The new code changes the way that extent back references are recorded, making them significantly more efficient. In general, v0.19 is a dramatic speed improvement over v0.18 in almost every workload.

The v0.19 utilities are meant for use with kernels 2.6.31-rc1 and higher. Git trees are available with the new format code for 2.6.30 kernels, please see the download section for details.

If you do not wish to roll forward to the new disk format, use the v0.18 utilities.