Pre-0.17.12 every Mapfile::record() persisted the full mapfile via tempfile-create + write + atomic-rename. On local LVM that's microseconds; on NFS each rename is multiple RPCs through the unraid user-share fuse layer, dragging a Black Mass UHD rip from ~11 MB/s on local to ~1.5 MB/s on NFS — the mapfile path alone burned multiple seconds of wall time per real-world second of work. Mapfile now batches the rename to once per second: - record() always updates in-memory state and stats; only fires write_to_disk when last_flushed.elapsed() >= FLUSH_INTERVAL (1 s). - New flush() API forces a persist; called by sweep_pipeline's consumer at end-of-sweep and by Disc::patch at end-of-patch, after the file's sync_all. - Drop impl best-effort flushes so an early-return / unwind doesn't silently lose pending state. Crash-safety changes from "lose at most one block" to "lose at most 1 s of recorded progress" — the ISO file's payload bytes are unaffected; only the mapfile's authority over which sectors are already-good is at risk, and a resume re-reads anything Pass 1 had already covered. Measured on the BU40N test bed against Black Mass UHD inner zone: - NFS staging: 1.5 MB/s → 16.48 MB/s (10.9× recovery) - Local LVM staging: 11.09 MB/s → 11.83 MB/s (+6.7 % bonus) Internal round_trip_load test now flushes before reading back from disk. External patch / copy tests are unaffected: patch and sweep_pipeline flush at completion before returning.
45 lines
1.1 KiB
TOML
45 lines
1.1 KiB
TOML
[package]
|
|
name = "libfreemkv"
|
|
version = "0.17.12"
|
|
edition = "2024"
|
|
rust-version = "1.86"
|
|
license = "AGPL-3.0-only"
|
|
description = "Open source raw disc access library for optical drives"
|
|
repository = "https://github.com/freemkv/libfreemkv"
|
|
keywords = ["bluray", "uhd", "optical", "scsi", "disc"]
|
|
categories = ["hardware-support", "multimedia"]
|
|
|
|
[dependencies]
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
sha1 = "0.10"
|
|
sha2 = "0.10"
|
|
aes = "0.8"
|
|
cbc = "0.1"
|
|
flate2 = "1"
|
|
num-bigint = "0.4"
|
|
num-traits = "0.2"
|
|
num-integer = "0.1"
|
|
rand = "0.8"
|
|
cmac = "0.7"
|
|
zip = { version = "2", default-features = false, features = ["deflate"] }
|
|
base64 = "0.22.1"
|
|
# Trace-level instrumentation for Disc::copy + SgIoTransport::execute. Permitted
|
|
# under CLAUDE.md ("Acceptable strings: debug/trace logging"). Consumers (autorip)
|
|
# wire a tracing subscriber and pipe events into the JSONL debug log.
|
|
tracing = "0.1"
|
|
|
|
[target.'cfg(target_os = "linux")'.dependencies]
|
|
libc = "0.2"
|
|
|
|
[target.'cfg(target_os = "macos")'.dependencies]
|
|
libc = "0.2"
|
|
|
|
[dev-dependencies]
|
|
tempfile = "3"
|
|
|
|
[[bench]]
|
|
name = "sgio_read"
|
|
harness = false
|
|
|