forked from openzfs/zfs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DLPX-85760 zoa panic: Failed to get zfs/.../data/... (openzfs#829)
If there is an unclean shutdown (e.g. kernel panic or power loss) while a txg is in progress, the agent may have created some objects for the in-progress txg, which are no longer needed. These objects are destroyed when the agent next starts, so that they are not leaked. The code that implements this, `PoolState::cleanup_data_objects()`, assumes that the last object written is `ObjectVersion(None)`, i.e. the reclaim code has not rewritten the last object. Unfortunately, this assumption is not true, which leads to the deletion of the last object, which is still in use. The bug can be triggered on any agent restart, even if the system did not reboot. This PR addresses the issue by taking into account the ObjectVersion when determining the last-valid object’s key. The problem was introduced by openzfs#668. The fix is simple because the version suffix is `-#`, rather than `/#` which was used earlier in the development of openzfs#668.
- Loading branch information
Showing
3 changed files
with
23 additions
and
22 deletions.
There are no files selected for viewing
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
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
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