diff options
author | Brian Behlendorf <[email protected]> | 2019-01-17 15:25:00 -0800 |
---|---|---|
committer | GitHub <[email protected]> | 2019-01-17 15:25:00 -0800 |
commit | 52b684236d35c64bb371bd19ce0c87552e368d77 (patch) | |
tree | faaa0151b63e4ade0ec119467e2a9f3698a6918a /module/zfs/policy.c | |
parent | 419ba5914552c6185afbe1dd17b3ed4b0d526547 (diff) |
ztest: scrub ddt repair
The ztest_ddt_repair() test is designed inflict damage to the
ddt which can be repairable by a scrub. Unfortunately, this
repair logic was broken at some point and it went undetected.
This issue is not specific to ztest, but thankfully this extra
redundancy is rarely enabled and even more rarely needed.
The root cause was identified to be the ddt_bp_create()
function called by dsl_scan_ddt_entry() which did not set the
dedup bit of the generated block pointer.
The consequence of this was that the ZIO_DDT_READ_PIPELINE was
never enabled for the block pointer during the scrub, and the
dedup ditto repair logic was never run. Note that for demand
reads which don't rely on ddt_bp_create() the required pipeline
stages would be enabled and the repair performed.
This was resolved by unconditionally setting the dedup bit in
ddt_bp_create(). This way all codes paths which may need to
perform a repair from a block pointer generated from the dtt
entry will be able too. The only exception is that the dedup
bit is cleared in ddt_phys_free() which is required to avoid
leaking space.
Reviewed by: Matt Ahrens <[email protected]>
Reviewed by: Tom Caputi <[email protected]>
Reviewed by: Serapheim Dimitropoulos <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #8270
Diffstat (limited to 'module/zfs/policy.c')
0 files changed, 0 insertions, 0 deletions