From dc72c60ec11ec48a3c325bd4249afbf3ba1876c7 Mon Sep 17 00:00:00 2001 From: Paul Dagnelie Date: Thu, 16 Feb 2023 09:23:39 -0800 Subject: [PATCH] zfs redact fails when dnodesize=auto Add handling to dmu_object_next for the case where *objectp == 0. Reviewed-by: Brian Behlendorf Signed-off-by: Paul Dagnelie Closes #14479 --- module/zfs/dmu_object.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/zfs/dmu_object.c b/module/zfs/dmu_object.c index 6fe4480d6..d0e39a423 100644 --- a/module/zfs/dmu_object.c +++ b/module/zfs/dmu_object.c @@ -409,6 +409,8 @@ dmu_object_next(objset_t *os, uint64_t *objectp, boolean_t hole, uint64_t txg) * hand off to dnode_next_offset() for further scanning. */ while (i <= last_obj) { + if (i == 0) + return (SET_ERROR(ESRCH)); error = dmu_object_info(os, i, &doi); if (error == ENOENT) { if (hole) {