zfs redact fails when dnodesize=auto

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
This commit is contained in:
Paul Dagnelie 2023-02-16 09:23:39 -08:00 committed by GitHub
parent 57cfae4a2f
commit dc72c60ec1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View 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) {