summaryrefslogtreecommitdiffstats
path: root/module/zfs/arc.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2015-12-09 11:00:35 -0800
committerBrian Behlendorf <[email protected]>2015-12-15 16:11:44 -0800
commit1cdb86cba2750f6da468e021a5ae2ba9a24530df (patch)
treebaf50103635242765b87d0b48ee06a9a22c21147 /module/zfs/arc.c
parenta6c6e0f5837402ec82e4c8bd49c867a1d1dd5376 (diff)
Handle block pointers with a corrupt logical size
Commit 5f6d0b6 was originally added to gracefully handle block pointers with a damaged logical size. However, it incorrectly assumed that all passed arc_done_func_t could handle a NULL arc_buf_t. Signed-off-by: Brian Behlendorf <[email protected]> Closes #4069 Closes #4080
Diffstat (limited to 'module/zfs/arc.c')
-rw-r--r--module/zfs/arc.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/module/zfs/arc.c b/module/zfs/arc.c
index 4e7e05924..074163369 100644
--- a/module/zfs/arc.c
+++ b/module/zfs/arc.c
@@ -4322,17 +4322,11 @@ top:
/*
* Gracefully handle a damaged logical block size as a
- * checksum error by passing a dummy zio to the done callback.
+ * checksum error.
*/
if (size > spa_maxblocksize(spa)) {
- if (done) {
- rzio = zio_null(pio, spa, NULL,
- NULL, NULL, zio_flags);
- rzio->io_error = ECKSUM;
- done(rzio, buf, private);
- zio_nowait(rzio);
- }
- rc = ECKSUM;
+ ASSERT3P(buf, ==, NULL);
+ rc = SET_ERROR(ECKSUM);
goto out;
}