]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Don't panic on unencrypted block in encrypted dataset
authorchrisperedun <126915832+chrisperedun@users.noreply.github.com>
Thu, 21 Dec 2023 19:12:30 +0000 (14:12 -0500)
committerGitHub <noreply@github.com>
Thu, 21 Dec 2023 19:12:30 +0000 (11:12 -0800)
While 763ca47 closes the situation of block cloning creating
unencrypted records in encrypted datasets, existing data still causes
panic on read. Setting zfs_recover bypasses this but at the cost of
potentially ignoring more serious issues.

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Chris Peredun <chris.peredun@ixsystems.com>
Closes #15677

module/zfs/dbuf.c
module/zfs/dmu_send.c

index e9d5abca3324286e4145577aef21c818b76eb6c9..324bf8cbc2763adb7297ca65600859c8908ff946 100644 (file)
@@ -1634,8 +1634,6 @@ dbuf_read_impl(dmu_buf_impl_t *db, zio_t *zio, uint32_t flags,
         */
        if (db->db_objset->os_encrypted && !BP_USES_CRYPT(bpp)) {
                spa_log_error(db->db_objset->os_spa, &zb, &bpp->blk_birth);
-               zfs_panic_recover("unencrypted block in encrypted "
-                   "object set %llu", dmu_objset_id(db->db_objset));
                err = SET_ERROR(EIO);
                goto early_unlock;
        }
index 2d37ed2cdfb5c553ef69d49b4d60e52972e771b2..37c68528bf95d18a8719cbc1f6f05837ba9caa03 100644 (file)
@@ -1124,8 +1124,6 @@ send_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp,
        if (sta->os->os_encrypted &&
            !BP_IS_HOLE(bp) && !BP_USES_CRYPT(bp)) {
                spa_log_error(spa, zb, &bp->blk_birth);
-               zfs_panic_recover("unencrypted block in encrypted "
-                   "object set %llu", dmu_objset_id(sta->os));
                return (SET_ERROR(EIO));
        }