diff options
| author | Sami Tolvanen <samitolvanen@google.com> | 2015-12-07 11:19:01 +0000 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-12-27 18:49:21 +0100 |
| commit | 520d1e4be80fa603433ba7d89fdf117a37a610de (patch) | |
| tree | 1a98b61ef1d4bb2c9b20b6e36e55a89ded48fa25 /Documentation | |
| parent | 2a1ae53d30b485019854d6908ece456b52c7ba9f (diff) | |
dm verity: add support for forward error correction
Add support for correcting corrupted blocks using Reed-Solomon.
This code uses RS(255, N) interleaved across data and hash
blocks. Each error-correcting block covers N bytes evenly
distributed across the combined total data, so that each byte is a
maximum distance away from the others. This makes it possible to
recover from several consecutive corrupted blocks with relatively
small space overhead.
In addition, using verity hashes to locate erasures nearly doubles
the effectiveness of error correction. Being able to detect
corrupted blocks also improves performance, because only corrupted
blocks need to corrected.
For a 2 GiB partition, RS(255, 253) (two parity bytes for each
253-byte block) can correct up to 16 MiB of consecutive corrupted
blocks if erasures can be located, and 8 MiB if they cannot, with
16 MiB space overhead.
Bug: 21893453
Change-Id: Ib0372f49f45127e33bfe6b7182b0d608f56f3c7e
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
(cherry picked from commit a431c56bf1764448c12fd2d545b15466d552460c)
Diffstat (limited to 'Documentation')
| -rw-r--r-- | Documentation/device-mapper/verity.txt | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Documentation/device-mapper/verity.txt b/Documentation/device-mapper/verity.txt index e15bc1a0f..1058f365d 100644 --- a/Documentation/device-mapper/verity.txt +++ b/Documentation/device-mapper/verity.txt @@ -79,6 +79,31 @@ restart_on_corruption not compatible with ignore_corruption and requires user space support to avoid restart loops. +use_fec_from_device + Use forward error correction (FEC) to recover from corruption if hash + verification fails. Use encoding data from the specified device. This + may be the same device where data and hash blocks reside, in which case + fec_start must be outside data and hash areas. + + If the encoding data covers additional metadata, it must be accessible + on the hash device after the hash blocks. + + Note: block sizes for data and hash devices must match. + +fec_roots + Number of generator roots. This equals to the number of parity bytes in + the encoding data. For example, in RS(M, N) encoding, the number of roots + is M-N. + +fec_blocks + The number of encoding data blocks on the FEC device. The block size for + the FEC device is <data_block_size>. + +fec_start + This is the offset, in <data_block_size> blocks, from the start of the + FEC device to the beginning of the encoding data. + + Theory of operation =================== |
