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 <behlendorf1@llnl.gov>
Closes #4069
Closes #4080
This commit is contained in:
parent
bf8b4a9fd5
commit
8fe1fb14cb
|
@ -4319,17 +4319,11 @@ top:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Gracefully handle a damaged logical block size as a
|
* 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 (size > spa_maxblocksize(spa)) {
|
||||||
if (done) {
|
ASSERT3P(buf, ==, NULL);
|
||||||
rzio = zio_null(pio, spa, NULL,
|
rc = SET_ERROR(ECKSUM);
|
||||||
NULL, NULL, zio_flags);
|
|
||||||
rzio->io_error = ECKSUM;
|
|
||||||
done(rzio, buf, private);
|
|
||||||
zio_nowait(rzio);
|
|
||||||
}
|
|
||||||
rc = ECKSUM;
|
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue