]> granicus.if.org Git - zfs/commitdiff
Handle block pointers with a corrupt logical size
authorBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 9 Dec 2015 19:00:35 +0000 (11:00 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 16 Dec 2015 00:11:44 +0000 (16:11 -0800)
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 <behlendorf1@llnl.gov>
Closes #4069
Closes #4080

module/zfs/arc.c

index 4e7e059248776b4eb3b0b7a76bc5d2708de3f97e..0741633696b24266a2d52c8c8309ad2cc77ffecd 100644 (file)
@@ -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;
                }