Commit Graph

5 Commits

Author SHA1 Message Date
rhn 07b8c74bc8 btrfs-progs: docs: clarify btrfs-send checksum
The way the CRC32C checksum used for btrfs-send differs from the way
it's used elsewhere in btrfs. Without making the distinction, it's easy
to make the flawed assumption that CRC32C always refers to the same, and
end up with code that produces the wrong checksums.

This small note should guide the reader to the right function.

The best notes on the protocol I found are here:
https://archive.kernel.org/oldwiki/btrfs.wiki.kernel.org/index.php/Design_notes_on_Send/Receive.html

The crc32c might be used in two meanings and this could be confusing
when implementing the send stream protocol.

Rust code describing the algorithm for the crc crate that worked for me:

pub const CRC_32_BTRFS_SEND: crc::Algorithm<u32> = crc::Algorithm {
	width: 32, poly: 0x1edc6f41, init: 0, refin: true, refout: true,
	xorout: 0, check: 0xe3069283, residue: 0xb798b438
};

(it's a slight variation on the one used in ISCSI)

Note: Documentation/dev/dev-send-stream.rst briefly mentions that

Pull-request: #794
Author: rhn <gihu.rhn@porcupinefactory.org>
[ rephrase changelog and copy text from pull request and add link to
  developer documentation of the send stream ]
Signed-off-by: David Sterba <dsterba@suse.com>
2024-08-14 23:59:47 +02:00
David Sterba a0137082de btrfs-progs: docs: formatting updates
- use :file: and :command:
- simplify manual page references
- add more web links
- typo fixes
- more cross-references

Signed-off-by: David Sterba <dsterba@suse.com>
2023-07-26 14:59:10 +02:00
David Sterba c0360b4735 btrfs-progs: docs: fix typos
Namely change eg. to e.g. and ie. to i.e.

Signed-off-by: David Sterba <dsterba@suse.com>
2022-12-07 21:00:25 +01:00
David Sterba c6be84840f btrfs-progs: docs: add more chapters (part 2)
The feature pages share the contents with the manual page section 5 so
put the contents to separate files. Progress: 2/3.

Signed-off-by: David Sterba <dsterba@suse.com>
2021-12-17 11:53:44 +01:00
David Sterba 9756d90ce3 btrfs-progs: docs: add more of the new doc structure
Add overall structure for now, some contents is from wiki.

Signed-off-by: David Sterba <dsterba@suse.com>
2021-11-30 16:00:48 +01:00