Skip to content

qa/cephfs: sync before snapshotting in test_dir_merge_with_snap_items - #72106

Merged
vshankar merged 1 commit into
ceph:mainfrom
vshankar:wip-71060
Oct 13, 2026
Merged

vshankar merged 1 commit into
ceph:mainfrom
vshankar:wip-71060

Conversation

@vshankar

Copy link
Copy Markdown
Contributor

The test writes to each file and then takes two snapshots while the data is still buffered on the client. The kernel client then flushes a capsnap for each snapshot, so the MDS cows a snapped dentry per snapshot ([2,2] and [3,3]) instead of one spanning both ([2,3]). That doubles the snap items, pushes each dirfrag over mds_bal_split_size and splits the directory again after the files are removed.

Sync before taking the snapshots so no capsnaps are generated.

Fixes: http://tracker.ceph.com/issues/71060

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.

The test writes to each file and then takes two snapshots while the
data is still buffered on the client. The kernel client then flushes a
capsnap for each snapshot, so the MDS cows a snapped dentry per snapshot
([2,2] and [3,3]) instead of one spanning both ([2,3]). That doubles the
snap items, pushes each dirfrag over mds_bal_split_size and splits the
directory again after the files are removed.

Sync before taking the snapshots so no capsnaps are generated.

Fixes: http://tracker.ceph.com/issues/71060
Signed-off-by: Venky Shankar <[email protected]>
@vshankar
vshankar requested a review from a team September 26, 2026 17:41
@vshankar vshankar added the cephfs Ceph File System label Sep 26, 2026
@github-actions github-actions Bot added the tests label Sep 26, 2026
@vshankar

Copy link
Copy Markdown
Contributor Author

jenkins retest this please

1 similar comment
@vshankar

Copy link
Copy Markdown
Contributor Author

jenkins retest this please

@vshankar

vshankar commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

This PR has been added to main integration testing by vshankar started 2026-10-04-08:18.

@vshankar

vshankar commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

jenkins retest this please

@vshankar

vshankar commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@vshankar vshankar left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

# flush buffered writes before snapshotting. otherwise the (kernel)
# client flushes a capsnap per snapshot, each cow'ing a separate
# snapped dentry, which doubles the snap items and splits the dir.
self.mount_a.run_shell(["sync"])

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.

this was a pain for me as well in writing a reproducer...

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

Labels

cephfs Ceph File System tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants