zfs/module
Brian Behlendorf 3c80e0742a
Verify dRAID empty sectors
Verify that all empty sectors are zero filled before using them to
calculate parity.  Failure to do so can result in incorrect parity
columns being generated and written to disk if the contents of an
empty sector are non-zero.  This was possible because the checksum
only protects the data portions of the buffer, not the empty sector
padding.

This issue has been addressed by updating raidz_parity_verify() to
check that all dRAID empty sectors are zero filled.  Any sectors
which are non-zero will be fixed, repair IO issued, and a checksum
error logged.  They can then be safely used to verify the parity.

This specific type of damage is unlikely to occur since it requires
a disk to have silently returned bad data, for an empty sector, while
performing a scrub.  However, if a pool were to have been damaged
in this way, scrubbing the pool with this change applied will repair
both the empty sector and parity columns as long as the data checksum
is valid.  Checksum errors will be reported in the `zpool status`
output for any repairs which are made.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Mark Maybee <mark.maybee@delphix.com>
Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #12857
2022-01-04 16:46:32 -08:00
..
avl module: avl: fix unused, remove argsused 2021-12-23 09:42:47 -08:00
icp module: icp: fix unused, remove argsused 2021-12-23 09:42:47 -08:00
lua Use fallthrough macro 2021-09-14 10:17:54 -06:00
nvpair libnvpair: fix unused, remove argsused 2021-12-23 09:42:47 -08:00
os FreeBSD: fix unpropagated error 2021-12-23 11:39:29 -08:00
spl Cleanup linux module kbuild files 2020-06-10 09:24:15 -07:00
unicode Update `checkstyle` workflow env to ubuntu-20.04 2021-11-02 14:02:57 -06:00
zcommon module: zcommon: zprop: fix unused, remove argsused 2021-12-23 09:42:47 -08:00
zfs Verify dRAID empty sectors 2022-01-04 16:46:32 -08:00
zstd Linux 5.16: Resolve ZSTD_isError symbol collision in Linux kernel 2021-12-07 12:28:22 -08:00
.gitignore Cleanup linux module kbuild files 2020-06-10 09:24:15 -07:00
Kbuild.in Add zstd support to zfs 2020-08-20 10:30:06 -07:00
Makefile.bsd Code cleanups 2021-11-30 10:32:38 -08:00
Makefile.in Workaround Debian's fake System.map behavior 2021-12-17 12:43:13 -08:00