]> git.proxmox.com Git - mirror_zfs.git/commitdiff
zfs redact fails when dnodesize=auto
authorPaul Dagnelie <paul.dagnelie@delphix.com>
Thu, 16 Feb 2023 17:23:39 +0000 (09:23 -0800)
committerGitHub <noreply@github.com>
Thu, 16 Feb 2023 17:23:39 +0000 (09:23 -0800)
Add handling to dmu_object_next for the case where *objectp == 0.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Paul Dagnelie <pcd@delphix.com>
Closes #14479

module/zfs/dmu_object.c

index 6fe4480d6d9a406cffe58a78fbbf57af7a31010d..d0e39a423bb0c2335f955ac3ed134b6cf0ee2a8d 100644 (file)
@@ -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) {