Bug #9421: zdb should detect and print out the number of "leaked" objects
zfs diff and zdb should explicitly mark objects that are on the deleted queue
zfs diff and zdb currently traverse every single dnode in a dataset and tries to figure out the path of the object by following it's parent.
When an object is placed on the delete queue, for all practical purposes it's already discarded, it's parent might not exist anymore, and another object might now have the object number that belonged to the parent.
While all of the above makes sense, when trying to figure out the path of an object that is on the delete queue, we can run into issues where either it is impossible to determine the path because the parent is gone, or another dnode has taken it's place and thus we are returned a wrong path.
We should therefore avoid trying to determine the path of an object on the delete queue and mark the object itself as being on the delete queue to avoid confusion. To achieve this, we currently have two ideas:
1. When putting an object on the delete queue, change it's parent object number to a known constant that means NULL.
2. When displaying objects, first check if it is present on the delete queue.
Updated by Electric Monk about 4 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit 20b5dafb425396adaebd0267d29e1026fc4dc413 Author: Paul Dagnelie <firstname.lastname@example.org> Date: 2018-05-01T19:59:06.000Z 9421 zdb should detect and print out the number of "leaked" objects 9422 zfs diff and zdb should explicitly mark objects that are on the deleted queue Reviewed by: Matt Ahrens <email@example.com> Reviewed by: Pavel Zakharov <firstname.lastname@example.org> Approved by: Matt Ahrens <email@example.com>