Commit Graph
8 Commits
Author SHA1 Message Date
Sebastian UnterschützandClaude Opus 5.5 6dcb7b676f 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>
2026-12-03 22:17:47 +01:00
Sebastian UnterschützandClaude Opus 5.5 330a3ec12c feat!: remove the rsync backend
The native libcephfs backend is the only transfer path. The rsync
transport, the mounted-filesystem access and its helpers (mount check,
path resolution below a mount, mount claim, quota and hardlink repair
through the mount) are removed, together with the rsync lab test and
the client image that only added rsync.

The claim and release tests now exercise the native claim through a
local test file system with real flock locks.

BREAKING CHANGE: "backend": "rsync" and the endpoint field "mount" are
rejected. "backend" is optional and only accepts "native"; jobs created
with "native" resume without it. Journals of rsync jobs cannot be
resumed. Builds without the build tag ceph only support doctor and
status.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 22:03:22 +01:00
Sebastian UnterschützandClaude Opus 5.5 e2c4549ade fix(native): replace the writing client before verification
The writing client kept the caps of the files it wrote last. Every
lookup of the verification client on one of them made the MDS recall
the caps entry by entry, which cost about five seconds per lookup in
the lab and stalled a 100,000-file verification near its end.

Verify now opens a fresh target client, closes the writer, which
returns all caps at once, and keeps writing through the fresh client.
The claim lock is held through a client of its own, so it survives the
change.

Verify also checks non-directory entries in parallel with the
configured number of workers. The walk and the directories stay
serial, so skipped subtrees are handled in walk order.

Transfer statistics report the duration of each round in seconds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 21:50:35 +01:00
Sebastian UnterschützandClaude Opus 5.5 a6e7bbb17e feat: release the target claim in cleanup
cleanup now deletes the claim file under .cephmig/claims as its last
step, if it holds the job's own ID, and removes the claim directories
when they are empty. A cleaned-up job is finished: cleanup and finalize
do nothing and do not claim the target again, and sync is refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 20:37:20 +01:00
Sebastian UnterschützandClaude Opus 5.5 83e15bccb2 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>
2026-12-03 20:19:31 +01:00
Sebastian UnterschützandClaude Opus 5.5 a6fda8f8d3 style: add blank lines between declarations and statement blocks
Separate top-level declarations and multi-line statements with blank
lines, keeping an "if err != nil" check next to the statement it
belongs to. Expand semicolon one-liners, group the nativeTransport
fields by purpose, and format the cgo preamble as readable C.
Apart from the expanded one-liners and the C preamble, the change
is whitespace only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 18:36:19 +01:00
Sebastian UnterschützandClaude Opus 5.5 c2ef7a6c3b docs: add package and doc comments for exported identifiers
Document every exported type, function and method in the migration,
storage and cephfsnative packages and add package comments for
migration and the cephmig command, following the commentary rules of
Effective Go. Comments on unexported helpers now start with the name
they describe.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 18:07:48 +01:00
Sebastian UnterschützandClaude Opus 5.5 7705ed3eaf chore: import CephMig prototype
Initial import of the existing CephFS subvolume migration prototype,
including the native libcephfs transport, rsync backend, local Ceph
lab environment and integration tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 18:05:53 +01:00