Skip to main content

Module kata_9p_backend

Module kata_9p_backend 

Source
Expand description

ModelBackend — the capnp-RPC Backend for the Kata 9P translator.

This is the production counterpart to the in-memory test backend. It turns each 9P filesystem operation into a capnp RPC against the model service’s fs scope (nine.capnp envelope), via the generated ModelClient. The flow is the mirror of [RemoteModelMount], which goes VFS → RPC:

  Kata guest (virtio-9P) ──► Translator ──► ModelBackend ──► ModelClient.fs()
       9P2000.L wire            fid table      capnp RPC (nine.capnp)

The model service resolves the synthetic /srv/model/<ref>/... tree from its FsHandler/SyntheticTree, exactly as it does for the in-process VFS.

§Fid numbering

The translator allocates 9P fids on its side; we forward them unchanged as the model service’s remote fids (same one-to-one scheme RemoteModelMount uses). The first walk component establishes the model reference; later single-name walks traverse the path within that model’s synthetic tree.

Structs§

ModelBackend
Backend impl that proxies 9P operations to the model service.