Use correct block pointer in block cloning case.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Signed-off-by: Pawel Jakub Dawidek <pawel@dawidek.net>
Closes #14806
This commit is contained in:
Pawel Jakub Dawidek 2023-05-03 01:24:26 +09:00 committed by GitHub
parent 012829df0c
commit d96e29576c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1620,8 +1620,7 @@ dbuf_read_impl(dmu_buf_impl_t *db, zio_t *zio, uint32_t flags,
* If this is not true it indicates tampering and we report an error. * If this is not true it indicates tampering and we report an error.
*/ */
if (db->db_objset->os_encrypted && !BP_USES_CRYPT(bpp)) { if (db->db_objset->os_encrypted && !BP_USES_CRYPT(bpp)) {
spa_log_error(db->db_objset->os_spa, &zb, spa_log_error(db->db_objset->os_spa, &zb, &bpp->blk_birth);
&db->db_blkptr->blk_birth);
zfs_panic_recover("unencrypted block in encrypted " zfs_panic_recover("unencrypted block in encrypted "
"object set %llu", dmu_objset_id(db->db_objset)); "object set %llu", dmu_objset_id(db->db_objset));
err = SET_ERROR(EIO); err = SET_ERROR(EIO);