Skip to content

Commit a4e9f2c

Browse files
(@silopolis)kdave
authored andcommitted
btrfs-progs: docs: checksumming editing
1 parent c9ec818 commit a4e9f2c

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

Documentation/ch-checksumming.rst

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
1-
Data and metadata are checksummed by default, the checksum is calculated before
2-
write and verified after reading the blocks from devices. The whole metadata
3-
block has a checksum stored inline in the b-tree node header, each data block
1+
Data and metadata are checksummed by default. The checksum is calculated before
2+
writing and verified after reading the blocks from devices. The whole metadata
3+
block has an inline checksum stored in the b-tree node header. Each data block
44
has a detached checksum stored in the checksum tree.
55

66
There are several checksum algorithms supported. The default and backward
7-
compatible is *crc32c*. Since kernel 5.5 there are three more with different
7+
compatible algorithm is *crc32c*. Since kernel 5.5 there are three more with different
88
characteristics and trade-offs regarding speed and strength. The following list
99
may help you to decide which one to select.
1010

11-
CRC32C (32bit digest)
12-
default, best backward compatibility, very fast, modern CPUs have
11+
CRC32C (32 bits digest)
12+
Default, best backward compatibility. Very fast, modern CPUs have
1313
instruction-level support, not collision-resistant but still good error
14-
detection capabilities
14+
detection capabilities.
1515

16-
XXHASH (64bit digest)
17-
can be used as CRC32C successor, very fast, optimized for modern CPUs utilizing
18-
instruction pipelining, good collision resistance and error detection
16+
XXHASH (64 bits digest)
17+
Can be used as CRC32C successor. Very fast, optimized for modern CPUs utilizing
18+
instruction pipelining, good collision resistance and error detection.
1919

20-
SHA256 (256bit digest)
21-
a cryptographic-strength hash, relatively slow but with possible CPU
22-
instruction acceleration or specialized hardware cards, FIPS certified and
23-
in wide use
20+
SHA256 (256 bits digest)
21+
Cryptographic-strength hash. Relatively slow but with possible CPU
22+
instruction acceleration or specialized hardware cards. FIPS certified and
23+
in wide use.
2424

25-
BLAKE2b (256bit digest)
26-
a cryptographic-strength hash, relatively fast with possible CPU acceleration
27-
using SIMD extensions, not standardized but based on BLAKE which was a SHA3
28-
finalist, in wide use, the algorithm used is BLAKE2b-256 that's optimized for
29-
64bit platforms
25+
BLAKE2b (256 bits digest)
26+
Cryptographic-strength hash. Relatively fast, with possible CPU acceleration
27+
using SIMD extensions. Not standardized but based on BLAKE which was a SHA3
28+
finalist, in wide use. The algorithm used is BLAKE2b-256 that's optimized for
29+
64-bit platforms.
3030

3131
The *digest size* affects overall size of data block checksums stored in the
3232
filesystem. The metadata blocks have a fixed area up to 256 bits (32 bytes), so
@@ -61,8 +61,8 @@ The accelerated versions are however provided by the modules and must be loaded
6161
explicitly (:command:`modprobe sha256`) before mounting the filesystem to make use of
6262
them. You can check in :file:`/sys/fs/btrfs/FSID/checksum` which one is used. If you
6363
see *sha256-generic*, then you may want to unmount and mount the filesystem
64-
again, changing that on a mounted filesystem is not possible.
65-
Check the file :file:`/proc/crypto`, when the implementation is built-in, you'd find
64+
again. Changing that on a mounted filesystem is not possible.
65+
Check the file :file:`/proc/crypto`, when the implementation is built-in, you'd find:
6666

6767
.. code-block:: none
6868
@@ -72,7 +72,7 @@ Check the file :file:`/proc/crypto`, when the implementation is built-in, you'd
7272
priority : 100
7373
...
7474
75-
while accelerated implementation is e.g.
75+
While accelerated implementation is e.g.:
7676

7777
.. code-block:: none
7878

0 commit comments

Comments
 (0)