summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Ahrens <[email protected]>2019-06-20 18:30:40 -0700
committerBrian Behlendorf <[email protected]>2019-06-20 18:30:40 -0700
commitaccd6d9dc411b150d5313b2e777381f13da8861b (patch)
tree2dff66e30537355c434ef4daf6965a9fc63ac14b
parenta64f8276c7c2e121f438866d2f91ddff22031e7f (diff)
dedup=verify doesn't clear the blkptr's dedup flag
The logic to handle strong checksum collisions where the data doesn't match is incorrect. It is not clearing the dedup bit of the blkptr, which can cause a panic later in zio_ddt_free() due to the dedup table not matching what is in the blkptr. Reviewed-by: Tom Caputi <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Matthew Ahrens <[email protected]> External-issue: DLPX-48097 Closes #8936
-rw-r--r--module/zfs/zio.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/module/zfs/zio.c b/module/zfs/zio.c
index e36a7893d..b2f722eb2 100644
--- a/module/zfs/zio.c
+++ b/module/zfs/zio.c
@@ -3155,7 +3155,9 @@ zio_ddt_write(zio_t *zio)
BP_ZERO(bp);
} else {
zp->zp_dedup = B_FALSE;
+ BP_SET_DEDUP(bp, B_FALSE);
}
+ ASSERT(!BP_GET_DEDUP(bp));
zio->io_pipeline = ZIO_WRITE_PIPELINE;
ddt_exit(ddt);
return (zio);