Skip to content

cephfs/snapdiff: introduce mask param for file attr changes - #68054

Merged
vshankar merged 1 commit into
ceph:mainfrom
ifed01:wip-ifed-snapdiff-mask
Aug 5, 2026
Merged

vshankar merged 1 commit into
ceph:mainfrom
ifed01:wip-ifed-snapdiff-mask

Conversation

@ifed01

@ifed01 ifed01 commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

Fixes: https://tracker.ceph.com/issues/75705

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

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@ifed01
ifed01 requested review from sajibreadd and vshankar March 27, 2026 15:28
@github-actions github-actions Bot added cephfs Ceph File System pybind tests labels Mar 27, 2026
@ifed01
ifed01 requested a review from joscollin March 30, 2026 07:57
@vshankar
vshankar requested a review from kotreshhr March 30, 2026 10:33

@joscollin joscollin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The new mask parameter controls which file attribute changes are included in snapdiff.

@ifed01 Why file attribute changes are not mandatory inclusions in snapdiff?

@ifed01

ifed01 commented Apr 2, 2026

Copy link
Copy Markdown
Contributor Author

The new mask parameter controls which file attribute changes are included in snapdiff.

@ifed01 Why file attribute changes are not mandatory inclusions in snapdiff?

Generally speaking that's for the sake of better flexibility. It's hard to predict what exact attribute change one might want to track. While tracking any attribute (e.g. atime/ctime) might result in redundant output. Hence providing the control to the caller

@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@github-actions github-actions Bot added the stale label Jun 1, 2026
@ifed01

ifed01 commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

unstale

@vshankar vshankar 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. I will add a commit on top of this to bump up libcephfs minor version. We have started to follow this lately for API changes.

@vshankar

Copy link
Copy Markdown
Contributor

This PR has been added to main integration testing by vshankar started 2026-07-21-10:48.

@vshankar vshankar 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.

@vshankar
vshankar merged commit 0cf2acd into ceph:main Aug 5, 2026
6 of 7 checks passed
@ifed01
ifed01 deleted the wip-ifed-snapdiff-mask branch August 5, 2026 07:08
@anoopcs9

anoopcs9 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

LGTM. I will add a commit on top of this to bump up libcephfs minor version. We have started to follow this lately for API changes.

This breaks ABI for consumers like go-ceph (ceph/go-ceph#1309) that use dlsym with locally defined copies of the struct/function signature. Both the new diff_mask parameter in ceph_open_snapdiff() and the mask field in struct ceph_snapdiff_info cause issues.

@vshankar

vshankar commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

LGTM. I will add a commit on top of this to bump up libcephfs minor version. We have started to follow this lately for API changes.

This breaks ABI for consumers like go-ceph (ceph/go-ceph#1309) that use dlsym with locally defined copies of the struct/function signature. Both the new diff_mask parameter in ceph_open_snapdiff() and the mask field in struct ceph_snapdiff_info cause issues.

Would checking the libcephfs version number suffice for go-ceph? (as discussed)?

@anoopcs9

anoopcs9 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

LGTM. I will add a commit on top of this to bump up libcephfs minor version. We have started to follow this lately for API changes.

This breaks ABI for consumers like go-ceph (ceph/go-ceph#1309) that use dlsym with locally defined copies of the struct/function signature. Both the new diff_mask parameter in ceph_open_snapdiff() and the mask field in struct ceph_snapdiff_info cause issues.

Would checking the libcephfs version number suffice for go-ceph? (as discussed)?

I've settled on the check #ifdef CEPH_SNAPDIFF_MODE to detect the new function pointer signature using dlysm. Let's see how it goes with ceph/go-ceph#1310.

@phlogistonjohn

Copy link
Copy Markdown
Contributor

I'm going to push back here... we should not be working around this on go-ceph. You are not just making a breaking change for go-ceph after all but other consumers of this api too.
Why aren't we creating a ceph_open_snapdiff2? Isn't that the more typical approach to making an incompatible change to a public API?

Comment thread src/mds/Server.cc
<< dendl;
unsigned res_mask = 0;
if (before.meta_differs(in, diff_mask, res_mask) ) {
dout(0) << __func__ << " attrs changed " << dn->get_name() << " "

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.

Was flooding the MDS log with "attrs (not) changed" entries intended? This used to be logged at 30.

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.

Probably a left over debug bit.

@vshankar

vshankar commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

I'm going to push back here... we should not be working around this on go-ceph. You are not just making a breaking change for go-ceph after all but other consumers of this api too.
Why aren't we creating a ceph_open_snapdiff2? Isn't that the more typical approach to making an incompatible change to a public API?

Fair. Lesson learnt here. We have acted somewhat relaxed when it comes to introducing changes like this under the assumption that such APIs are used by tools we maintain ourselves.

I will fix it up and also I think it's time I write up a document (that lives in ceph repo) that acts as a checklist for anyone reviewing API/ABI changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants