fix!: remove skipping of unchanged subtrees

Intermediate rounds skipped a directory when its inode version and its
ceph.dir.rctime matched the previous round. In the 10,000-file lab test
a round snapshot taken seconds after changes skipped tree/ with about
250 changed files in its subdirectories: the inode version of tree/
changes only with its own entries, and Ceph had not yet propagated the
rctime of the grandchildren. The target snapshot of that round was
incomplete, and its verification skipped the same subtrees; only
finalize closed the gap.

Every round now scans all metadata again. Base index entries that the
old version marked carried are never trusted, so such files are copied
in full in the next round.

The smallfiles verification now checks only snapshots that sync did not
remove.

BREAKING CHANGE: the configuration field "full_scan" and the transfer
statistic "skipped_subtrees" are removed; a configuration with
"full_scan" is rejected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Sebastian UnterschützandClaude Opus 5.5 committed 2026-12-03 22:17:47 +01:00
1 parent 82c64f9908
commit 6dcb7b676f
16 files changed
+117 -448

No files matched your search

+6 -8
View File
@@ -87,10 +87,10 @@ Consequences for cephmig:
- With `CEPH_SNAPDIFF_CTIME`, snapdiff2 should report the changes v1 missed
in the lab (chmod, xattr changes, writes through a hardlink alias,
overwrites with a reset mtime), because all of them change the ctime.
- It compares the two snapshots in the MDS, so unlike the rctime shortcut it
depends neither on delayed rctime propagation nor on client clocks. It
could therefore replace the rctime check in intermediate rounds and, after
a lab proof, possibly shorten `finalize`.
- It compares the two snapshots in the MDS, so unlike the removed rctime
shortcut (see [metadata scan](migration.md#metadata-scan)) it depends
neither on delayed rctime propagation nor on client clocks. After a lab
proof, it could shorten rounds and possibly `finalize`.
- Open: v1 reported every directory, including unchanged ones. The sources
do not say whether snapdiff2 behaves differently; without that, it cannot
be used to skip subtrees.
@@ -128,10 +128,8 @@ state is reconstructed fully and natively. There is no fallback to another
transfer method.
Snapdiff cannot replace the metadata scan (see
[skipping unchanged subtrees](migration.md#skipping-unchanged-subtrees)).
Intermediate rounds skip subtrees whose recursive ctime did not change;
application snapshots and the final round still scan all metadata and check
the full hardlink topology.
[metadata scan](migration.md#metadata-scan)). Every round scans all metadata
and checks the full hardlink topology.
Data verification reads all bytes for the first state and only the copied
ranges for confirmed later states. Unchanged ranges are taken from the
previously verified base. The target must belong exclusively to the