Skip to content

mds/flock: exclude non-persisted fields from ceph_lock_state_t::dump() - #63936

Merged
tchaikov merged 1 commit into
ceph:mainfrom
tchaikov:wip-mds-flock-exclude-dump
Jun 26, 2025
Merged

tchaikov merged 1 commit into
ceph:mainfrom
tchaikov:wip-mds-flock-exclude-dump

Conversation

@tchaikov

@tchaikov tchaikov commented Jun 15, 2025 •

Copy link
Copy Markdown
Contributor

Commit 09f3c87 added ceph_lock_state_t to ceph-dencoder verification, but some fields are intentionally not persisted, causing test failures in readable.sh and check-generated.sh due to encode/decode mismatches.

The following fields are excluded from dump() as they are not persisted:

  • type: always set in constructor, no need to persist
  • waiting_locks: runtime-only field for active lock management
  • client_waiting_lock_counts: runtime-only field for client tracking

Current tests pass by reusing instances (preserving non-persisted fields), but upcoming changes will use fresh instances per decode, exposing this inconsistency.

This change ensures dump() output matches what is actually encoded/decoded, fixing test compatibility with the new allocation strategy.

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

Commit 09f3c87 added ceph_lock_state_t to ceph-dencoder verification,
but some fields are intentionally not persisted, causing test failures
in readable.sh and check-generated.sh due to encode/decode mismatches.

The following fields are excluded from dump() as they are not persisted:
- type: always set in constructor, no need to persist
- waiting_locks: runtime-only field for active lock management
- client_waiting_lock_counts: runtime-only field for client tracking

Current tests pass by reusing instances (preserving non-persisted fields),
but upcoming changes will use fresh instances per decode, exposing this
inconsistency.

This change ensures dump() output matches what is actually encoded/decoded,
fixing test compatibility with the new allocation strategy.

Signed-off-by: Kefu Chai <[email protected]>
@tchaikov

Copy link
Copy Markdown
Contributor Author

jenkins test api

@tchaikov

Copy link
Copy Markdown
Contributor Author

@NitzanMordhai hi Nitzan, could you please help review this change?

@tchaikov

Copy link
Copy Markdown
Contributor Author

@NitzanMordhai ping.

@tchaikov
tchaikov requested a review from a team June 26, 2025 04:10
@tchaikov

Copy link
Copy Markdown
Contributor Author

@ceph/cephfs hi CephFS folks, could you help review this change at your convenience?

@vshankar

Copy link
Copy Markdown
Contributor

@ceph/cephfs hi CephFS folks, could you help review this change at your convenience?

Of course!

@NitzanMordhai

Copy link
Copy Markdown
Contributor

@NitzanMordhai ping.

sorry @tchaikov missed that notification

@NitzanMordhai NitzanMordhai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@tchaikov

Copy link
Copy Markdown
Contributor Author

@NitzanMordhai ping.

sorry @tchaikov missed that notification

no worries. thanks for your review and approval.

@tchaikov
tchaikov merged commit 3e1126f into ceph:main Jun 26, 2025
@tchaikov
tchaikov deleted the wip-mds-flock-exclude-dump branch June 26, 2025 06:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cephfs Ceph File System

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants