Bug #9422
closedBug #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
100%
Description
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.
Related issues
Updated by Electric Monk about 4 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
git commit 20b5dafb425396adaebd0267d29e1026fc4dc413
commit 20b5dafb425396adaebd0267d29e1026fc4dc413 Author: Paul Dagnelie <pcd@delphix.com> 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 <matt@delphix.com> Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com> Approved by: Matt Ahrens <mahrens@delphix.com>
Updated by Joshua M. Clulow over 3 years ago
- Related to Bug #9559: zfs diff handles files on delete queue in fromsnap poorly added