Commit Graph
10 Commits
Author SHA1 Message Date
Sebastian UnterschützandClaude Opus 5.5 cc2dff46a0 feat(native): preserve ctime of files, directories and symlinks
The MDS takes an inode's ctime from the time stamp the client sends with
each request. The native backend overrides clock_gettime per thread and
per libcephfs call: modifying calls run at 1970-01-01T00:00:01Z, and the
last change to each entry creates and removes the xattr
user.cephmig.ctime stamped with the source ctime. Link, unlink, rename
and xattr requests set ctime = max(stamp, mtime), also backwards.

- write xattrs and quotas before SetAttr, which must come last
- always restamp directories after their children and hardlinks after
  linking or pruning, since the writer's cache may be stale
- verify through a separate, freshly mounted target client
- name the differing attributes in metadata mismatch errors
- compare ctime of every entry, the root included, in the lab fixture

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 19:33:19 +01:00
Sebastian UnterschützandClaude Opus 5.5 02ebc08c88 feat(native): preserve access and birth time of every entry
Read atime and btime with statx and set them together with owner,
mode and mtime. Verification compares both, so a published snapshot
must match the source in all three times. The integration fixture
compares the times through libcephfs, since ceph-fuse does not expose
the birth time.

The ctime cannot be preserved: Ceph 21.2.0 accepts CEPH_SETATTR_CTIME
but stores the time of the call. The rsync backend still preserves
only the mtime.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 18:48:25 +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 ec0297fd23 fix(dev): take Go toolchain from pinned golang image
The native build pinned golang-1.26.10-1.el10_2, which is no longer
available in the Rocky Linux 10 repositories, so make dev-native-build
and make dev-up failed. Copy Go 1.26.11 from the official golang image,
pinned by digest, and set GOTOOLCHAIN=local so the build does not
download another toolchain.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 18:27:21 +01:00
Sebastian UnterschützandClaude Opus 5.5 0fce76b7e3 docs(readme): restructure README following reproducibility guidelines
Reorganize the README into title and description, installation, usage,
examples, project structure, documentation, contributing, license and
contact, as recommended by the Utrecht University computational
reproducibility workshop. Commands are copy-paste ready and the example
configuration is the real lab file. The detailed lab description moves
to docs/lab.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 18:08:59 +01:00
Sebastian UnterschützandClaude Opus 5.5 c4a02daeff refactor(migration): use slices.Contains instead of local helper
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 18:08:01 +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 7413b9a43a refactor(nativeprobe): return errors instead of panicking
Move the probe logic into run and report failures on stderr with a
non-zero exit status, as recommended by Effective Go. Group standard
library imports separately and add a package doc comment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 18:07:48 +01:00
Sebastian UnterschützandClaude Opus 5.5 8fe60a4f8f refactor!: rename module and move CLI to cmd/cephmig
Use the repository path git.zb-server.de/Sebi/CephfsMig as module
path instead of the non-importable name CephMig, and move the cephmig
entry point from the repository root to cmd/cephmig next to
cmd/nativeprobe. Makefile and Dockerfile.native build the new path.

BREAKING CHANGE: import paths change from CephMig/... to
git.zb-server.de/Sebi/CephfsMig/..., and the binary is now built from
./cmd/cephmig instead of the module root.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 18:06:09 +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