Last active
October 4, 2017 08:14
-
-
Save Fabian-Gruenbichler/6234f96c6a33397561541f75889a7d3b to your computer and use it in GitHub Desktop.
variant with duplicate dmu_object_next
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uint64_t obj = rwa->last_touched_object + 1; | |
int free_err = 0, next_err = 0; | |
while (next_err == 0) { | |
dmu_object_info_t doi; | |
free_err = dmu_object_info(rwa->os, obj, &doi); | |
if (free_err == ENOENT) { | |
next_err = dmu_object_next(rwa->os, &obj, FALSE, 0); | |
continue; | |
} else if (free_err != 0) | |
break; | |
free_err = dmu_free_long_object(rwa->os, obj); | |
if (free_err != 0) | |
break; | |
next_err = dmu_object_next(rwa->os, &obj, FALSE, 0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment