feat(native): skip unchanged subtrees in intermediate sync rounds

Intermediate cephmig round snapshots skip a subdirectory whose inode,
inode version and ceph.dir.rctime equal those in the base snapshot. The
index carries the subtree's entries over from the base and marks them
carried; carried entries never serve as base for a block delta.
Snapdiff, copy, pruning and verification leave skipped subtrees out.

Application snapshots and finalize always scan everything, so a change
missed because of delayed rctime propagation or a lagging client clock
costs extra work but cannot reach the final state. The config option
full_scan disables the shortcut; the journal reports skipped_subtrees.

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 20:19:31 +01:00
1 parent b7d2a0687e
commit 83e15bccb2
9 files changed
+394 -12

No files matched your search

+4 -1
View File
@@ -74,11 +74,13 @@ func (e Engine) Inspect(ctx context.Context, c Config) (*Inspection, error) {
// Round describes one snapshot transfer handed to a RoundTransport.
// BaseName and BaseSourcePath name the last completed snapshot, if any,
// which allows an incremental transfer.
// which allows an incremental transfer. SkipUnchanged permits skipping
// subtrees whose recursive ctime did not change since the base.
type Round struct {
SourcePath, TargetPath string
BaseName, BaseSourcePath string
Name, StatePath string
SkipUnchanged bool
}
// RoundTransport is a Transport that keeps state across a snapshot round,
@@ -100,6 +102,7 @@ type TransferStats struct {
BytesVerified int64 `json:"bytes_verified"`
BlockDiffFiles int64 `json:"blockdiff_files"`
SnapDiffEntries int64 `json:"snapdiff_entries"`
SkippedSubtrees int64 `json:"skipped_subtrees,omitempty"`
}
// NewEngine returns an Engine for c.Backend and a Closer that releases its