nx_mvault_reindex.nx
buildroot/runtime/nx_mvault_reindex.nx
about
nx_mvault_reindex.nx -- the per-item MIGRATE pipeline core (dry-run/commit).
The live driver walks the real galx paths (getdents) and calls this per file;
the outer walk also folds a numbered-image-sequence DIR into ONE manga work
(ctx=IMGSEQ). This core is the gate-provable heart: for one item it does
contextual-classify -> content CID (dedup key) -> DSM dest path
-> dedup check vs the store -> reclaim tally -> (commit) seg-store record.
NO-COPY MIGRATE (operator "no space for a copy, too many TB"): the LIVE
driver relocates each blob with sys_renameat WITHIN /volume1 (zero-copy,
additive: rename preserves the bytes) to the dest this core computes. commit=0
is DRY-RUN (classify + plan + dedup tally, writes NOTHING) so the whole run
can be previewed before a single byte moves.
Composes ONLY proven organs. license_tier: ORIGINAL
dependencies 9 imports · 2 importers
imports: nx_syscalls.nxnx_canon_cid.nxnx_media_pool.nxnx_media_sniff.nxnx_mvault_ingest.nxnx_mvault_context.nxnx_mvault_record.nxnx_mvault_layout.nxnx_mvault_reclaim.nx
imported by: nx_mvault_reindex_gate.nxnx_mvault_walk.nx
structs
| none |
consts
| 26 | const K_MAGIC_4096: i64 = 4096 |
| 42 | const MV_EXTPATH: i64 = 256 // scratch for the synthetic "f.<ext>" sniff path |
functions
| 44 | func mv_classify_plan(head: *u8, headlen: i64, class_code: i64, ctx: i64, |
| 77 | func mv_reindex_cid(rc: *i64, store_prefix: *u8, dest_root: *u8, called by 1: mv_reindex_one calls 6: mv_classify_plansys_mmapmv_store_getmv_reclaim_addmv_record_buildmv_store_put |
| 103 | func mv_reindex_one(rc: *i64, store_prefix: *u8, dest_root: *u8, |