summaryrefslogtreecommitdiff
path: root/drivers/md/Kconfig
diff options
context:
space:
mode:
authorSami Tolvanen <samitolvanen@google.com>2015-12-03 14:26:30 +0000
committerSami Tolvanen <samitolvanen@google.com>2016-03-31 09:11:43 -0700
commit83c1827e5887c9288e4ecb7962c6dc63596ad922 (patch)
treebbc4558f200e0ad2546acac8d7485678b7a042d4 /drivers/md/Kconfig
parent890b7865c5f5e7e5b5bc6acaa4193d967fb8bea7 (diff)
UPSTREAM: 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. Change-Id: Ife4f8889f7fbf0974bf3ed4be6d3322ae9b4cb0e Signed-off-by: Sami Tolvanen <samitolvanen@google.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com> (cherry picked from commit a739ff3f543afbb4a041c16cd0182c8e8d366e70)
Diffstat (limited to 'drivers/md/Kconfig')
-rw-r--r--drivers/md/Kconfig12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/md/Kconfig b/drivers/md/Kconfig
index 7913fdcfc849..d8b0ab6f3753 100644
--- a/drivers/md/Kconfig
+++ b/drivers/md/Kconfig
@@ -458,6 +458,18 @@ config DM_VERITY
If unsure, say N.
+config DM_VERITY_FEC
+ bool "Verity forward error correction support"
+ depends on DM_VERITY
+ select REED_SOLOMON
+ select REED_SOLOMON_DEC8
+ ---help---
+ Add forward error correction support to dm-verity. This option
+ makes it possible to use pre-generated error correction data to
+ recover from corrupted blocks.
+
+ If unsure, say N.
+
config DM_SWITCH
tristate "Switch target support (EXPERIMENTAL)"
depends on BLK_DEV_DM