diff --git a/module/zfs/arc.c b/module/zfs/arc.c index 737904f34855..11285aa46eef 100644 --- a/module/zfs/arc.c +++ b/module/zfs/arc.c @@ -5944,6 +5944,12 @@ arc_read(zio_t *pio, spa_t *spa, const blkptr_t *bp, * Embedded BP's have no DVA and require no I/O to "read". * Create an anonymous arc buf to back it. */ + if (!zfs_blkptr_verify(spa, bp, zio_flags & + ZIO_FLAG_CONFIG_WRITER, BLK_VERIFY_LOG)) { + rc = SET_ERROR(ECKSUM); + goto out; + } + hdr = buf_hash_find(guid, bp, &hash_lock); } @@ -6115,17 +6121,6 @@ arc_read(zio_t *pio, spa_t *spa, const blkptr_t *bp, goto out; } - /* - * Gracefully handle a damaged logical block size as a - * checksum error. - */ - if (lsize > spa_maxblocksize(spa)) { - rc = SET_ERROR(ECKSUM); - if (hash_lock != NULL) - mutex_exit(hash_lock); - goto out; - } - if (hdr == NULL) { /* * This block is not in the cache or it has diff --git a/module/zfs/zio.c b/module/zfs/zio.c index 87ccb6861850..66ac545c7981 100644 --- a/module/zfs/zio.c +++ b/module/zfs/zio.c @@ -1107,9 +1107,6 @@ zio_read(zio_t *pio, spa_t *spa, const blkptr_t *bp, { zio_t *zio; - (void) zfs_blkptr_verify(spa, bp, flags & ZIO_FLAG_CONFIG_WRITER, - BLK_VERIFY_HALT); - zio = zio_create(pio, spa, BP_PHYSICAL_BIRTH(bp), bp, data, size, size, done, private, ZIO_TYPE_READ, priority, flags, NULL, 0, zb,