Skip to content

mds,client: correct last_issue struct fields and consistently send last_issue in cap messages#60283

Merged
batrick merged 6 commits intoceph:mainfrom
batrick:i66704
Nov 13, 2024
Merged

mds,client: correct last_issue struct fields and consistently send last_issue in cap messages#60283
batrick merged 6 commits intoceph:mainfrom
batrick:i66704

Conversation

@batrick
Copy link
Member

@batrick batrick commented Oct 12, 2024

First set of changes I'd like to do for

https://tracker.ceph.com/issues/66704

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
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

A const getter already exists.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
Originally, the last_sent sequence from the MDS was sent by the client during
bulk cap release but it was shortly after changed to the last_issue which is
the sequence number that the cap was originally "issued" by the MDS rank (which
may be updated after import of caps).

Fixes: 6208f57
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
The peer seq is used as the issue_seq. Use that name for consistency.

Fixes: 4fdeb00
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
@github-actions github-actions bot added the cephfs Ceph File System label Oct 12, 2024
Right now only the clients tell the MDS what they believe the issue_seq to be.
The clients are expected to figure out issue_seq updates at

Fixes: https://tracker.ceph.com/issues/68515
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
@batrick
Copy link
Member Author

batrick commented Oct 14, 2024

jenkins test api

@batrick
Copy link
Member Author

batrick commented Oct 14, 2024

jenkins test make check arm64

@batrick
Copy link
Member Author

batrick commented Oct 19, 2024

This PR is under test in https://tracker.ceph.com/issues/68629.

batrick added a commit to batrick/ceph that referenced this pull request Oct 19, 2024
* refs/pull/60283/head:
	mds: add issue_seq to all cap messages
	include/ceph_fs: correct ceph_mds_cap_peer field name
	include/ceph_fs: correct ceph_mds_cap_item field name
	messages/MClientCaps: use correct ceph_seq_t for cap sequence types
	messages/MClientCaps: dump issue_seq for debugging
	mds: remove dead code
@batrick
Copy link
Member Author

batrick commented Oct 22, 2024

@vshankar
Copy link
Contributor

(On this today)

@batrick
Copy link
Member Author

batrick commented Oct 31, 2024

This PR is under test in https://tracker.ceph.com/issues/68786.

@batrick
Copy link
Member Author

batrick commented Nov 6, 2024

This PR is under test in https://tracker.ceph.com/issues/68859.

@batrick
Copy link
Member Author

batrick commented Nov 13, 2024

@batrick batrick merged commit 3829eb6 into ceph:main Nov 13, 2024
@batrick batrick deleted the i66704 branch November 13, 2024 03:13
tcap.seq = m->peer.seq - 1;
tcap.issue_seq = tcap.seq;
tcap.seq = m->peer.issue_seq - 1;
tcap.issue_seq = tcap.issue_seq;
Copy link
Contributor

Choose a reason for hiding this comment

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

@batrick I was taking a look at "ceph: correct ceph_mds_cap_peer field name" patch for the kernel client and there is something fishy here:

  • previously both clients effectively assigned m->peer.seq - 1 to tcap.seq and tcap.issue_seq
  • m->peer.seq got renamed to m->peer.issue_seq
  • kernel client continues to assign that value to both fields
			tcap->seq = t_issue_seq - 1;
			tcap->issue_seq = t_issue_seq - 1;
  • userspace client assigns that value only to tcap.seq, for tcap.issue_seq there appears to be a bogus self-assignment

Copy link
Member Author

Choose a reason for hiding this comment

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

@batrick I was taking a look at "ceph: correct ceph_mds_cap_peer field name" patch for the kernel client and there is something fishy here:

* previously both clients effectively assigned `m->peer.seq - 1` to `tcap.seq` and `tcap.issue_seq`

Correct.

* `m->peer.seq` got renamed to `m->peer.issue_seq`

Correct.

* kernel client continues to assign that value to both fields
			tcap->seq = t_issue_seq - 1;
			tcap->issue_seq = t_issue_seq - 1;
* userspace client assigns that value only to `tcap.seq`, for `tcap.issue_seq` there appears to be a bogus self-assignment

Oh, very nice catch. My find/replace clearly messed that up.

Copy link
Member Author

Choose a reason for hiding this comment

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

batrick added a commit to batrick/ceph that referenced this pull request Nov 18, 2024
Credit to  Ilya Dryomov for spotting this.

[1] ceph#60283 (comment)

Fixes: 1da6ef2
Fixes: https://tracker.ceph.com/issues/68973
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
batrick added a commit to batrick/ceph that referenced this pull request Feb 17, 2025
Credit to  Ilya Dryomov for spotting this.

[1] ceph#60283 (comment)

Fixes: 1da6ef2
Fixes: https://tracker.ceph.com/issues/68973
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
(cherry picked from commit a07c5ef)
batrick added a commit to batrick/ceph that referenced this pull request Feb 17, 2025
Credit to  Ilya Dryomov for spotting this.

[1] ceph#60283 (comment)

Fixes: 1da6ef2
Fixes: https://tracker.ceph.com/issues/68973
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
(cherry picked from commit a07c5ef)
harriscr pushed a commit to ceph/ceph-ci that referenced this pull request May 15, 2025
Credit to  Ilya Dryomov for spotting this.

[1] ceph/ceph#60283 (comment)

Fixes: 1da6ef2
Fixes: https://tracker.ceph.com/issues/68973
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
joscollin pushed a commit to joscollin/ceph that referenced this pull request Oct 3, 2025
Credit to  Ilya Dryomov for spotting this.

[1] ceph#60283 (comment)

Fixes: 1da6ef2
Fixes: https://tracker.ceph.com/issues/68973
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
(cherry picked from commit a07c5ef)
joscollin pushed a commit to joscollin/ceph that referenced this pull request Oct 3, 2025
Credit to  Ilya Dryomov for spotting this.

[1] ceph#60283 (comment)

Fixes: 1da6ef2
Fixes: https://tracker.ceph.com/issues/68973
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
(cherry picked from commit a07c5ef)
batrick added a commit to batrick/ceph that referenced this pull request Oct 3, 2025
Credit to  Ilya Dryomov for spotting this.

[1] ceph#60283 (comment)

Fixes: 1da6ef2
Fixes: https://tracker.ceph.com/issues/68973
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
(cherry picked from commit a07c5ef)
joscollin pushed a commit to joscollin/ceph that referenced this pull request Oct 4, 2025
Credit to  Ilya Dryomov for spotting this.

[1] ceph#60283 (comment)

Fixes: 1da6ef2
Fixes: https://tracker.ceph.com/issues/68973
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
(cherry picked from commit a07c5ef)
NitzanMordhai pushed a commit to NitzanMordhai/ceph that referenced this pull request Mar 5, 2026
Credit to  Ilya Dryomov for spotting this.

[1] ceph#60283 (comment)

Fixes: 1da6ef2
Fixes: https://tracker.ceph.com/issues/68973
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
(cherry picked from commit a07c5ef)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants