Project

General

Profile

Librados - expose checksums » History » Version 1

Jessica Mack, 07/03/2015 07:14 PM

1 1 Jessica Mack
h1. Librados - expose checksums
2
3
h3. Summary
4
5
Allow librados write operations to pass checksum metadata long with data buffers so that this information can follow the data all the way down the stack for verification at various layers.  This will close one of several gaps in providing true end-to-end data integrity verification.
6
7
h3. Owners
8
9
* Sage Weil (Red Hat)
10
* Name (Affiliation)
11
12
h3. Interested Parties
13
14
* Name (Affiliation)
15
16
h3. Current Status
17
18
We checksum data as it passes over the wire, and verify it on the other end (to detect network bit flips that TCP's checksumming misses).
19
We periodically read data off disk, calculate a new checksum, and compare it to replicas (to detect bit rot). 
20
We use crc32c throughout.
21
22
h3. Detailed Description
23
24
We should define a generic, extensible way to describe the checksum of a buffer or data extent.  We use crc32c today, but we should avoid locking ourselves into a single scheme for all time.
25
We should make new write call variants (e.g., rados_write2, rados_write_full2, etc.) that optionally accept checksum metdata for the data buffer being passed in.  Same goes for the read operations (we should pass out the checksum metdata along with the data).
26
Initially, these will not do much.
27
Eventually, we can extend the internal protocol (the messenger on-wire protocol and/or the rados MOSDOp[Reply] encodings) to pass this data over the wire to the OSD and back.
28
In some cases, we can use it to populate the checksum fields in object_info_t (see other blueprint).
29
We can have options to control which layers of the stack recalculate the checksum over the current data buffer for verification against the provided checksum.  We probably do not want to do this at *every* layer (too expensive), but should do it at least once before writing the data to disk, ideally at a point that avoids propagating a bit flip to multiple replicas.
30
Other things we might do with this later:
31
* pass checksum info through the ObjectStore interface
32
* add a rados class (or native rados op) to calculate/verify checksum info on the server side ("fixity check")
33
34
h3. Work items
35
36
h4. Coding tasks
37
38
# define extensible checksum metadata structure
39
# define new librados read/write calls that include option checksum metadata (C and C++ interfaces) 
40
# extend MOSDOp and MOSDOpReply to pass checksum metadata for the data payload
41
## allow this metadata, when present, to allow the messenger to skip the crc it is doing for the data payload