Skip to content

Add asynchronous incremental prefetch refresh #9

Description

@RenanGBarreto

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions