Skip to content

DAOS-19257 rebuild: discard stale tree after layout upgrade#18616

Open
wangshilong wants to merge 1 commit into
release/2.8from
shilongw/DAOS-19257-2.8
Open

DAOS-19257 rebuild: discard stale tree after layout upgrade#18616
wangshilong wants to merge 1 commit into
release/2.8from
shilongw/DAOS-19257-2.8

Conversation

@wangshilong

Copy link
Copy Markdown
Contributor

During pool layout upgrade, vos_obj_layout_upgrade() only handles the in-place case where old and new OI entries share the same ilog/vos_tree.

If obj_layout_diff() returns > 0, the shard is migrated to another target and the source old-layout OI entry still owns its tree exclusively. Reclaim previously called vos_obj_delete_ent() unconditionally, which removed only the OI entry and leaked the stale tree.

Use obj_layout_diff() to detect whether the upgrade was in place. Keep the old behavior for shared-tree entries, and discard the underlying tree when the old entry is stale and no longer shared.

Steps for the author:

  • Commit message follows the guidelines.
  • Appropriate Features or Test-tag pragmas were used.
  • Appropriate Functional Test Stages were run.
  • At least two positive code reviews including at least one code owner from each category referenced in the PR.
  • Testing is complete. If necessary, forced-landing label added and a reason added in a comment.

After all prior steps are complete:

  • Gatekeeper requested (daos-gatekeeper added as a reviewer).

During pool layout upgrade, vos_obj_layout_upgrade() only handles the
in-place case where old and new OI entries share the same ilog/vos_tree.

If obj_layout_diff() returns > 0, the shard is migrated to another
target and the source old-layout OI entry still owns its tree
exclusively. Reclaim previously called vos_obj_delete_ent()
unconditionally, which removed only the OI entry and leaked the stale
tree.

Use obj_layout_diff() to detect whether the upgrade was in place. Keep
the old behavior for shared-tree entries, and discard the underlying
tree when the old entry is stale and no longer shared.

Signed-off-by: Wang Shilong <shilong.wang@hpe.com>
@wangshilong wangshilong requested review from a team as code owners July 6, 2026 23:49
@wangshilong wangshilong added the clean-cherry-pick Cherry-pick from another branch that did not require additional edits label Jul 6, 2026
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

Ticket title is 'Pool upgrade causes objects to occupy twice as much space after upgrade'
Status is 'In Review'
https://daosio.atlassian.net/browse/DAOS-19257

@wangshilong wangshilong requested review from kccain and liuxuezhao July 7, 2026 01:34
@wangshilong wangshilong requested a review from a team July 8, 2026 23:39
@daltonbohning daltonbohning added this to the release-2.8 milestone Jul 9, 2026
@daltonbohning daltonbohning added the waiting-for-merge-approval Waiting for merge approval label Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clean-cherry-pick Cherry-pick from another branch that did not require additional edits waiting-for-merge-approval Waiting for merge approval

Development

Successfully merging this pull request may close these issues.

4 participants