Skip to content

Commit d7be6ed

Browse files
committed
btrfs-progs: docs: mkfs and sectorsize updates
[ci skip] Signed-off-by: David Sterba <[email protected]>
1 parent e3232c2 commit d7be6ed

File tree

3 files changed

+20
-12
lines changed

3 files changed

+20
-12
lines changed

Documentation/Status.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,8 @@ Subpage block size
295295

296296
Most commonly used page sizes are 4KiB, 16KiB and 64KiB. All combinations with
297297
a 4KiB sector size filesystems are supported. Some features are not compatible
298-
with subpage or require another feature to work:
298+
with subpage or require another feature to work. Since btrfs-progs 6.7 the default
299+
sector size is 4KiB as this allows cross-architecture compatibility.
299300

300301
.. list-table::
301302
:header-rows: 1

Documentation/Subpage.rst

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,24 @@ using a filesystem that has different size of data block size (*sectorsize*)
66
and the host CPU page size. For easier implementation the support was limited
77
to the exactly same size of the block and page. On x86_64 this is typically
88
4KiB, but there are other architectures commonly used that make use of larger
9-
pages, like 64KiB on 64bit ARM or PowerPC. This means filesystems created
10-
with 64KiB sector size cannot be mounted on a system with 4KiB page size.
9+
pages, like 64KiB on 64bit ARM or PowerPC or 16KiB on Apple Silicon. This means
10+
filesystems created with 64KiB sector size cannot be mounted on a system with
11+
4KiB page size.
1112

12-
Since v6.7, filesystems are created with a 4KiB sectorsize by default,
13-
though it remains possible to create filesystems with other page sizes
13+
Since btrfs-progs 6.7, filesystems are created with a 4KiB sector size by
14+
default, though it remains possible to create filesystems with other sector sizes
1415
(such as 64KiB with the "-s 64k" option for :command:`mkfs.btrfs`). This
15-
ensures that new filesystems are compatible across other architecture
16-
variants using larger page sizes.
16+
ensures that new filesystems are compatible across other architecture variants
17+
using larger page sizes.
1718

1819
Requirements, limitations
1920
-------------------------
2021

21-
The initial subpage support has been added in v5.15. Most features are
22+
The initial subpage support has been added in kernel 5.15. Most features are
2223
already working without problems. On a 64KiB page system, a filesystem with
2324
4KiB sectorsize can be mounted and used as long as the initial mount succeeds.
24-
Subpage support is used by default for systems with a non-4KiB page size since v6.7.
25+
Subpage support is used by default for systems with a non-4KiB page size since
26+
btrfs-progs 6.7.
2527

2628
Please refer to status page of :ref:`status-subpage-block-size` for
2729
compatibility.

Documentation/mkfs.btrfs.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,15 +122,20 @@ OPTIONS
122122
-s|--sectorsize <size>
123123
Specify the sectorsize, the minimum data block allocation unit.
124124

125+
.. note::
126+
Versions prior to 6.7 set the sectorsize matching the host CPU
127+
page size, starting in 6.7 this is 4KiB for cross-architecture
128+
compatibility. Please read more about the :doc:`subpage block size support<Subpage>`
129+
and :ref:`its status<status-subpage-block-size>`.
130+
125131
By default, the value is 4KiB, but it can be manually set to match the
126-
system page size. However, if the sector size is different from the page
132+
system page size (e.g. using command :command:`getconf PAGE_SIZE`).
133+
However, if the sector size is different from the page
127134
size, the resulting filesystem may not be mountable by the current
128135
kernel, apart from the default 4KiB. Hence, using this option is not
129136
advised unless you intend to mount it on a system with the suitable
130137
page size.
131138

132-
.. note::
133-
Versions prior to 6.7 set the sectorsize matching to the page size.
134139

135140
-L|--label <string>
136141
Specify a label for the filesystem. The *string* should be less than 256

0 commit comments

Comments
 (0)