code wiki / (root) / nx_mvault_reindex.nx

nx_mvault_reindex.nx

buildroot/runtime/nx_mvault_reindex.nx

5501 B112 linesdepth 7pulls 18 transitivereach 2 importersview sourcekind librarytopic mvault
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_canon_cid.nx nx_media_pool.nx nx_media_sniff.nx nx_mvault_ingest.nx nx_mvault_context.nx nx_mvault_record.nx nx_mvault_layout.nx nx_mvault_reclaim.nx nx_mvault_reindex.nx nx_mvault_reindex_gate.nx nx_mvault_walk.nx

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

26const K_MAGIC_4096: i64 = 4096
42const MV_EXTPATH: i64 = 256 // scratch for the synthetic "f.<ext>" sniff path

functions

44func mv_classify_plan(head: *u8, headlen: i64, class_code: i64, ctx: i64,
77func mv_reindex_cid(rc: *i64, store_prefix: *u8, dest_root: *u8,
103func mv_reindex_one(rc: *i64, store_prefix: *u8, dest_root: *u8,
called by 1: main calls 2: cid_ofmv_reindex_cid