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>
This commit is contained in:
Sebastian UnterschützandClaude Opus 5.5 committed 2026-12-03 18:05:53 +01:00
commit 7705ed3eaf
58 files changed
+8769

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
//go:build ceph && cgo
package migration
import (
"context"
"io"
"CephMig/internal/cephfsnative"
)
func openNativeEngine(ctx context.Context, c Config, x Executor, log io.Writer) (Engine, io.Closer, error) {
if err := ctx.Err(); err != nil {
return Engine{}, nil, err
}
source, err := cephfsnative.Open(options(c.Source))
if err != nil {
return Engine{}, nil, err
}
target, err := cephfsnative.Open(options(c.Target))
if err != nil {
source.Close()
return Engine{}, nil, err
}
backend := &nativeTransport{source: source, target: target, config: c, log: log}
return Engine{Exec: x, Log: log, Transport: backend, Access: nativeAccess{backend}}, backend, nil
}