Status 状态

Overview 概述

For a list of features by their introduction, please see Changes (feature/version).
请参阅更改(功能/版本)中按其引入列出的功能列表。

The table below aims to serve as an overview for the stability status of the features BTRFS supports. While a feature may be functionally safe and reliable, it does not necessarily mean that its useful, for example in meeting your performance expectations for your specific workload. Combination of features can vary in performance, the table does not cover all possibilities.
下表旨在作为 BTRFS 支持的功能稳定状态的概览。虽然某个功能在功能上是安全可靠的,但这并不一定意味着它对您的特定工作负载的性能期望是有用的。功能组合可能在性能上有所不同,表格并未涵盖所有可能性。

The table is based on the latest released linux kernel: 6.8
该表格基于最新发布的 Linux 内核:6.8

The columns for each feature reflect the status of the implementation in following ways:
每个功能的列反映了实现状态的方式:

Stability - completeness of the implementation, use case coverage
稳定性 - 实现的完整性,用例覆盖率
Performance - how much it could be improved until the inherent limits are hit
性能 - 在达到固有限制之前可以提高多少
Notes - short description of the known issues, or other information related to status
注释 - 已知问题的简要描述,或与状态相关的其他信息

Legend: 传说:

  • OK: should be safe to use, no known major deficiencies
    正常:应该可以安全使用,没有已知的主要缺陷

  • mostly OK: safe for general use, there are some known problems that do not affect majority of users
    大多数正常:适合一般使用,有一些已知问题,但不影响大多数用户

  • Unstable: do not use for other then testing purposes, known severe problems, missing implementation of some core parts
    不稳定:仅用于测试目的,已知存在严重问题,某些核心部分尚未实现

Feature

Stability

Performance

Notes

Subvolumes, snapshots 子卷,快照

OK

OK

Compression

OK

Checksumming algorithms 校验算法

OK

OK

Defragmentation

mostly OK 大多数情况下都可以

extents get unshared (see below)
扩展获取未共享(见下文)

Autodefrag (in Administration)
自动碎片整理(在管理中)

OK

Discard (synchronous) 丢弃(同步)

OK

mounted with -o discard (has performance implications), also see fstrim
使用 -o discard 挂载(会影响性能),还请参阅 fstrim

Discard (asynchronous) 丢弃(异步)

OK

mounted with -o discard=async (improved performance)
使用 -o discard=async 挂载(提高性能)

Out-of-band dedupe 带外去重

OK

mostly OK 大部分情况下是可以的

(reflink), heavily referenced extents have a noticeable performance hit (see below)
(reflink), 引用范围较大会明显影响性能(见下文)

File range cloning 文件范围克隆

OK

mostly OK 大部分情况下正常

(reflink), heavily referenced extents have a noticeable performance hit (see below)
(reflink), 引用较多的范围会明显影响性能(见下文)

Filesystem resize 文件系统调整大小

OK

OK

shrink, grow 缩小,增长

Device replace 设备更换

mostly OK 大多数情况下正常

mostly OK 大多数情况下正常

(see below) (见下文)

Auto-repair

OK

OK

automatically repair from a correct spare copy if possible (DUP, RAID1, RAID10, RAID56)
如果可能的话,从正确的备用副本自动修复(DUP,RAID1,RAID10,RAID56)

Scrub

OK

OK

Scrub + RAID56

mostly OK 大多数情况下正常

mostly OK 大多数情况下正常

Degraded mount (in Administration)
挂载降级(在管理中)

OK

n/a

Balance

OK

OK

balance + qgroups can be slow when there are many snapshots
当快照数量较多时,平衡 + qgroups 可能会变慢

Send

OK

OK

Receive

OK

OK

Offline UUID change 离线 UUID 更改

OK

OK

Metadata UUID change 元数据 UUID 更改

OK

OK

Temporary FSID 临时 FSID

6.8

6.8

Single devices with same FSID can be mounted repeatedly, getting a temporary UUID.
具有相同 FSID 的单个设备可以重复挂载,获得临时 UUID。

Seeding

OK

OK

Quotas, qgroups 配额,qgroups

mostly OK 大部分情况下都可以

mostly OK 大部分情况下都可以

qgroups with many snapshots slows down balance
具有许多快照的 qgroups 会减慢平衡速度

Squota, simplified qgroups
Squota,简化的 qgroups

6.8

6.8

simplified qgroup accounting, better performance, specific use case
简化的 qgroup 记账,性能更好,特定用例

Swapfile

OK

n/a

with some limitations 具有一些限制

nodatacow

OK

OK

Subpage block size 子页面块大小

OK

OK

Also see table below for compatibility.
也请参阅下面的表格以了解兼容性。

Zoned mode 分区模式

mostly OK 大部分都可以

mostly OK 大部分都可以

Not yet feature complete but moderately stable, also see table below for compatibility.
尚未完全实现功能,但相对稳定,另请参阅下面的兼容性表。

Block group profiles 区块组概况

Feature

Stability

Performance

Notes

Single (block group profile)
单个(区块组概况)

OK

OK

DUP (block group profile)
DUP(区块组概况)

OK

OK

RAID0

OK

OK

RAID1

OK

mostly OK 大部分都可以

reading from mirrors in parallel can be optimized further (see below)
并行从镜像站点读取可以进一步优化(见下文)

RAID1C3

OK

mostly OK 大部分都可以

reading from mirrors in parallel can be optimized further (see below)
并行从镜像中读取可以进一步优化(见下文)

RAID1C4

OK

mostly OK 大部分情况下正常

reading from mirrors in parallel can be optimized further (see below)
并行从镜像中读取可以进一步优化(见下文)

RAID10

OK

mostly OK 大部分情况下都可以

reading from mirrors in parallel can be optimized further (see below)
并行从镜像中读取可以进一步优化(见下文)

RAID56

unstable

n/a

(see below) (见下文)

Mixed block groups 混合块组

OK

OK

On-disk format 磁盘格式

Features that are typically set at mkfs time (sometimes can be changed or converted later).
通常在 mkfs 时间设置的功能(有时可以稍后更改或转换)。

Feature

Stability

Performance

Notes

extended-refs

OK

OK

mkfs.btrfs default since 3.12
从 3.12 开始的 mkfs.btrfs 默认值

skinny-metadata

OK

OK

mkfs.btrfs default since 3.18
从 3.18 开始的 mkfs.btrfs 默认值

no-holes

OK

OK

mkfs.btrfs default since 5.15
从 5.15 开始的 mkfs.btrfs 默认值

Free space tree 空闲空间树

OK

OK

mkfs.btrfs default since 5.15
mkfs.btrfs 默认自 5.15 版本开始

Block group tree 块组树

OK

OK

Raid stripe tree 阵列条带树

mostly OK 大多数情况下正常

OK

not all profiles are supported and RST is behind CONFIG_BTRFS_DEBUG build option
并非所有配置文件都受支持,而且 RST 落后于 CONFIG_BTRFS_DEBUG 构建选项

Squota

OK

OK

Simplified tracking needs on-disk format update, but may work in a limited way without it.
简化的跟踪需要磁盘格式更新,但即使没有它,也可以以有限的方式工作。

Interoperability 互操作性 

Integration with other Linux features or external systems. See also.
与其他 Linux 功能或外部系统集成。另请参阅。

Feature

Stability

Performance

Notes

NFS

OK

OK

cgroups

OK

OK

IO controller IO 控制器

io_uring

OK

OK

fsverity

OK

OK

idmapped mount ID 映射挂载

OK

OK

Samba

OK

OK

compression, server-side copies, snapshots
压缩,服务器端复制,快照

Please open an issue if:
如果有任何问题,请提交一个问题

  • there’s a known missing entry
    已知缺失条目

  • a particular feature combination that has a different status and is worth mentioning separately
    具有不同状态且值得单独提及的特定功能组合

  • you know of a bug that lowers the feature status
    您知道一个降低功能状态的错误

Subpage block size 子页面块大小

Most commonly used page sizes are 4KiB, 16KiB and 64KiB. All combinations with a 4KiB sector size filesystems are supported. Some features are not compatible with subpage or require another feature to work. Since btrfs-progs 6.7 the default sector size is 4KiB as this allows cross-architecture compatibility.
最常用的页面大小为 4KiB、16KiB 和 64KiB。支持所有与 4KiB 扇区大小文件系统的组合。一些功能不兼容子页面或需要另一个功能才能工作。自 btrfs-progs 6.7 起,默认扇区大小为 4KiB,因为这样可以实现跨架构兼容性。

Feature

Status

Notes

Inline files 内联文件

unsupported

The max_inline mount option value is ignored, as if mounted with max_inline=0
max_inline 挂载选项值将被忽略,就好像使用 max_inline=0 进行挂载一样

Free space cache v1 空闲空间缓存 v1

unsupported

Free space tree is mandatory, v1 makes some assumptions about page size
空闲空间树是必需的,v1 对页面大小做出了一些假设

Compression

partial support 部分支持

Only page-aligned ranges can be compressed
只有页面对齐的范围才能被压缩

Sectorsize

supported

The list of supported sector sizes on a given version can be found in file /sys/fs/btrfs/features/supported_sectorsizes
在给定版本中支持的扇区大小列表可以在文件 /sys/fs/btrfs/features/supported_sectorsizes 中找到

Zoned mode 分区模式

Features that completely incompatible with zoned mode are listed below. Compatible features may not be listed and are assumed to work as they are unaffected by the zoned device constraints.
完全与分区模式不兼容的功能列在下面。兼容的功能可能没有列出,并假定它们可以正常工作,因为它们不受分区设备约束的影响。

Feature

Status

Notes

Boot

incompatible

The blocks where partition table is stored are used for super block
用于存储分区表的块被用于超级块

Mixed block groups 混合块组

incompatible

Interleaving data and metadata would lead to out of order write
数据和元数据交错会导致写入顺序混乱

NODATACOW

incompatible

In-place overwrite 原地覆盖

fallocate

incompatible

Preallocation of blocks would require an out of order write
预分配块将需要乱序写入

Free space cache v1 空闲空间缓存 v1

incompatible

Cache data are updated in a NODATACOW-way
缓存数据以 NODATACOW 方式更新

Swapfile

incompatible

Swap blocks are written out of order
交换块是按顺序写入的

Offline UUID change 脱机 UUID 更改

incompatible

Metadata blocks are updated in-place
元数据块在原地更新

Free space tree 空闲空间树

supported

Block group tree 块组树

supported

Raid stripe tree RAID 条带树

supported

Allows to use RAID in zoned mode
允许在分区模式下使用 RAID

Filesystem resize 文件系统调整大小

supported

Balance

supported

Metadata UUID change 元数据 UUID 更改

supported

RAID0, RAID1* RAID0,RAID1*

supported

requires raid-stripe-tree
需要 raid-stripe-tree

RAID56

not implemented 未实现

Will be supported once raid-stripe-tree support is implemented
一旦实现了 raid-stripe-tree 支持,将会得到支持

discard

not implemented 未实现

May not be required at all due to automatic zone reclaim
由于自动区域回收,可能根本不需要

subpage blocksize 子页面块大小

not implemented 未实现

Missing support for compressed data
不支持压缩数据

fsverity

TBD

seeding

TBD

Details that do not fit the table
不适合表格的详细信息

Defrag 碎片整理

The data affected by the defragmentation process will be newly written and will consume new space, the links to the original extents will not be kept. See also btrfs-filesystem(8) . Though autodefrag affects newly written data, it can read a few adjacent blocks (up to 64KiB) and write the contiguous extent to a new location. The adjacent blocks will be unshared. This happens on a smaller scale than the on-demand defrag and doesn’t have the same impact.
受碎片整理过程影响的数据将被重新写入并占用新空间,原始范围的链接将不会保留。另请参阅 btrfs-filesystem(8)。虽然 autodefrag 影响新写入的数据,但它可以读取几个相邻的块(最多 64KiB)并将连续的范围写入新位置。相邻的块将不共享。这比按需碎片整理规模小,影响也不同。

RAID1, RAID10 RAID1,RAID10 

The simple redundancy RAID levels utilize different mirrors in a way that does not achieve the maximum performance. The logic can be improved so the reads will spread over the mirrors evenly or based on device congestion.
简单冗余 RAID 级别利用不同的镜像,但无法达到最大性能。可以改进逻辑,使读取均匀地分布在镜像上,或基于设备拥塞情况进行读取。

RAID56

Please see https://btrfs.readthedocs.io/en/latest/btrfs-man5.html#raid56-status-and-recommended-practices .
请参阅 https://btrfs.readthedocs.io/en/latest/btrfs-man5.html#raid56-status-and-recommended-practices 。

Device replace 设备替换 

Device replace and device delete insist on being able to read or reconstruct all data. If any read fails due to an IO error, the delete/replace operation is aborted and the administrator must remove or replace the damaged data before trying again.
设备替换和设备删除坚持能够读取或重建所有数据。如果由于 IO 错误导致任何读取失败,则删除/替换操作将被中止,管理员必须在再次尝试之前移除或替换受损数据。

On-disk format 磁盘格式

The filesystem disk format is stable. This means it is not expected to change unless there are very strong reasons to do so. If there is a format change, filesystems which implement the previous disk format will continue to be mountable and usable by newer kernels.
文件系统磁盘格式是稳定的。这意味着除非有非常强烈的理由,否则不会发生变化。如果发生格式更改,实现先前磁盘格式的文件系统将继续可以被新内核挂载和使用。

The core of the on-disk format that comprises building blocks of the filesystem:
磁盘格式的核心构建模块,构成文件系统的基础:

  • layout of the main data structures, e.g. superblock, b-tree nodes, b-tree keys, block headers
    主要数据结构的布局,例如超级块,B 树节点,B 树键,块头

  • the COW mechanism, based on the original design of Ohad Rodeh’s paper “B-trees, Shadowing and Clones” (http://sylab-srv.cs.fiu.edu/lib/exe/fetch.php?media=paperclub:shadow_btree.pdf)
    基于 Ohad Rodeh 的论文“B-树,阴影和克隆”的原始设计的 COW 机制(http://sylab-srv.cs.fiu.edu/lib/exe/fetch.php?media=paperclub:shadow_btree.pdf)

Newly introduced features build on top of the above and could add specific structures. If a backward compatibility is not possible to maintain, a bit in the filesystem superblock denotes that and the level of incompatibility (full, read-only mount possible).
新引入的功能建立在上述基础之上,可能会添加特定的结构。如果无法保持向后兼容性,则文件系统超级块中的一个位表示这一点以及不兼容性的级别(完全,只读挂载可能)。