Why
Metadata and selected file regions may need refresh while device remains active. Refresh must never block USB activation or mutate an active generation.
Plan
- Start cancellable workers for immutable generations.
- Run refresh asynchronously at a configurable 300-second interval.
- Read through existing NBD/mapper path so nbdkit remains sole verified file-cache layer.
- Track covered ranges and refresh only missing or changed blocks where reliable source identity exists.
- Stop and join workers during reload, eject, shutdown, and generation replacement.
- Bound subprocess work, CPU, and concurrent refresh operations.
Acceptance criteria
- Activation does not wait for optional refresh.
- Refresh failures do not tear down a healthy active generation.
- Workers stop promptly and leave no subprocess behind.
- Tests cover cancellation, replacement, failure, and interval behavior.
Why
Metadata and selected file regions may need refresh while device remains active. Refresh must never block USB activation or mutate an active generation.
Plan
Acceptance criteria