src/virtio/blk.bend checks
raw source on the hub · import 0x51718d1816cd36f20955e9590377c5e5/src/virtio/blk.bend as Blk
7 imports
import Base import ../lib/u64.bend as U import ../lib/bytes.bend as B import ../vmm/abi.bend as V import ./queue.bend as Q import ../disk/store.bend as S import ../disk/pack.bend as Pk
Types
type Dseg source · line 153 · raw
Data
Dseg@sector:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @num:U32 -> @flags:U32 -> Dseg
Definitions
def Blk.id source · line 34 · raw
String
def Blk.features source · line 39 · raw
@ro:Bool -> 0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64
The offered features: VIRTIO_F_VERSION_1 (bit 32, bit 0 of the high word), VIRTIO_BLK_F_FLUSH (bit 9) and, when ro, VIRTIO_BLK_F_RO (bit 5).
def Blk.config source · line 42 · raw
@sectors:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> List<&2, U32>
def Blk.max_len source · line 48 · raw
U32
The most data one request moves (16 MiB): a longer one is IOERR, the disk untouched. A guest's lengths must not size the store walk (Blk.fuel steps, a cluster at a time).
def Blk.len_ok source · line 51 · raw
@+len:U32 -> Bool
def Blk.size_max source · line 59 · raw
U32
What the device offers so that Linux never builds a request past Blk.max_len(): VIRTIO_BLK_F_SIZE_MAX (bit 1) with size_max 128 KiB per segment and VIRTIO_BLK_F_SEG_MAX (bit 2) with seg_max 128 segments (128 * 128 KiB = 16 MiB; with the header and the status, 130 descriptors fit a queue of 256).
def Blk.seg_max source · line 62 · raw
U32
def Blk.offered.go source · line 65 · raw
@f:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> 0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64
def Blk.offered source · line 71 · raw
@ro:Bool -> 0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64
Blk.features, plus SIZE_MAX and SEG_MAX: what the device offers.
def Blk.config_limits source · line 75 · raw
@sectors:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> List<&2, U32>
The config space with the limits: capacity, size_max, seg_max.
def Blk.s_ok source · line 79 · raw
U32
Status codes.
def Blk.s_ioerr source · line 82 · raw
U32
def Blk.s_unsupp source · line 85 · raw
U32
def Blk.room source · line 89 · raw
@ds:List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Desc> -> U32
The total length of a chain's writable descriptors.
def Blk.id_bytes source · line 97 · raw
List<&2, U32>
The id string, NUL-padded (or cut) to 20 bytes.
def Blk.fits.rem source · line 103 · raw
@rem:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @+len:U32 -> Bool
Whether len bytes fit before the end of the disk when rem sectors remain after the start sector. Past 2^23 sectors any U32 length fits, and below it rem * 512 does not overflow a U32.
def Blk.fits source · line 109 · raw
@+sectors:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @+sector:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @len:U32 -> Bool
Whether the access of len bytes at sector ends within capacity sectors.
def Blk.offset source · line 113 · raw
@sector:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> 0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64
The byte offset of a sector (sector * 512).
def Blk.discard_max_sectors source · line 129 · raw
U32
Discard (VIRTIO_BLK_F_DISCARD, bit 13), offered for a writable disk: the guest names sectors it no longer needs and the host frees them (a hole in a raw image: they then read as zeros; whole qcow2 clusters that are the image's alone, src/disk/store.bend). One request holds 1 to discard_max_seg segments of 16 bytes {sector u64, num_sectors u32, flags u32}; a segment covers at most discard_max_sectors (2 GiB); flags other than UNMAP (bit 0) answer UNSUPP, a segment past the end IOERR. The host frees whole 4 KiB blocks (discard_align sectors) inside each segment: a partial block stays. Config: after capacity, size_max and seg_max, geometry, blk_size, topology, writeback and num_queues are 0 (their features are not offered), then max_discard_sectors, max_discard_seg and discard_sector_alignment (offsets 36, 40, 44).
def Blk.discard_max_seg source · line 132 · raw
U32
def Blk.discard_align source · line 135 · raw
U32
def Blk.offered_dis.go source · line 138 · raw
@ro:Bool -> @f:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> 0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64
def Blk.offered_dis source · line 146 · raw
@+ro:Bool -> 0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64
What the device offers: Blk.offered, plus DISCARD when writable.
def Blk.config_dis source · line 149 · raw
@sectors:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> List<&2, U32>
def Blk.dis.segs source · line 157 · raw
@fuel:Nat -> @bs:List<&2, U32> -> List<&2, Dseg>
The segments of a discard request's data (16 bytes each).
def Blk.dis.ok1 source · line 170 · raw
@+sectors:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @d:Dseg -> U32
def Blk.dis.status source · line 178 · raw
@ds:List<&2, Dseg> -> @+sectors:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> U32
A request's status before anything is freed: the first segment's that is not OK, else OK.
def Blk.dis.range source · line 187 · raw
@+sector:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @+num:U32 -> Pair(0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64, 0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64)
The whole 4 KiB blocks inside a segment: their offset and length (0: none).
def Blk.dis.free source · line 194 · raw
@-R:Type -> @st:0x51718d1816cd36f20955e9590377c5e5/src/disk/store.Store -> @r:Pair(0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64, 0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64) -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, Unit>
def Blk.dis.run source · line 199 · raw
@-R:Type -> @ds:List<&2, Dseg> -> @+st:0x51718d1816cd36f20955e9590377c5e5/src/disk/store.Store -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, Unit>
def Blk.offered_wz.go source · line 219 · raw
@ro:Bool -> @f:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> 0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64
Write zeroes (VIRTIO_BLK_F_WRITE_ZEROES, bit 14), offered for a writable raw image (BlkKind; a qcow2 image keeps DISCARD alone): the guest names sectors that must read as zeros (Linux: ext4's zero-out, fallocate's zero range, blkdiscard -z). Segments as DISCARD's; with UNMAP (bit 0) the host frees the whole 4 KiB blocks inside (holes: the space goes back to the host) and writes zeros in the partial ones at the ends; without it the range stays allocated (Op.disk_zero_keep). Config after discard's: max_write_zeroes_sectors, max_write_zeroes_seg and write_zeroes_may_unmap (offsets 48, 52, 56).
def Blk.offered_wz source · line 226 · raw
@+ro:Bool -> 0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64
def Blk.config_wz source · line 229 · raw
@sectors:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> List<&2, U32>
def Blk.wz.disk source · line 234 · raw
@st:0x51718d1816cd36f20955e9590377c5e5/src/disk/store.Store -> Maybe<&2, U32>
The raw image of a store (none for qcow2).
def Blk.wz.keep source · line 241 · raw
@-R:Type -> @+d:U32 -> @+off:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @+len:U32 -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, Unit>
def Blk.wz.unmap source · line 246 · raw
@-R:Type -> @+d:U32 -> @+off:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @+len:U32 -> @r:Pair(0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64, 0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64) -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, Unit>
One segment with UNMAP: the whole blocks inside (a, n) freed, zeros written before and after them.
def Blk.wz.one source · line 256 · raw
@-R:Type -> @+d:U32 -> @sg:Dseg -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, Unit>
def Blk.wz.run source · line 264 · raw
@-R:Type -> @ds:List<&2, Dseg> -> @+d:U32 -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, Unit>
def Blk.kind source · line 273 · raw
@+t:U32 -> Nat
The request kind of a type field: 0 IN, 1 OUT, 2 GET_ID, 3 FLUSH, 5 DISCARD (type 11), 6 WRITE_ZEROES (type 13), 4 unsupported.
def Blk.put source · line 282 · raw
@-R:Type -> @ds:List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Desc> -> @+off:U32 -> @+b:U32 -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, Unit>
Writes byte b at offset off of the writable area ds.
def Blk.reply source · line 293 · raw
@-R:Type -> @+w:List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Desc> -> @+room:U32 -> @res:Pair(U32, List<&2, U32>) -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, U32>
Scatters the data (cut to the room before the status byte), then writes the status into the last writable byte. Answers the bytes written.
def Blk.fuel source · line 304 · raw
Nat
The steps a request's store walk may take: a cluster at a time (512 bytes at least) down a chain of images.
def Blk.status source · line 310 · raw
@-R:Type -> @+st:0x51718d1816cd36f20955e9590377c5e5/src/disk/store.Store -> @done:Bool -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, U32>
The status after the host moved a request's data: IOERR when the store refused it (done false) or a host operation on its images failed (S.Store.status: a full host disk, an I/O error), else OK.
def Blk.in source · line 316 · raw
@-R:Type -> @ok:Bool -> @+st:0x51718d1816cd36f20955e9590377c5e5/src/disk/store.Store -> @sector:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @+w:List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Desc> -> @+room:U32 -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, U32>
IN: the room before the status byte filled from the store at sector.
def Blk.out source · line 329 · raw
@-R:Type -> @ok:Bool -> @+st:0x51718d1816cd36f20955e9590377c5e5/src/disk/store.Store -> @sector:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @ss:List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Iov> -> @+w:List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Desc> -> @+room:U32 -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, U32>
OUT: the readable data after the header (ss) written at sector.
def Blk.out_ro source · line 340 · raw
@-R:Type -> @ro:Bool -> @st:0x51718d1816cd36f20955e9590377c5e5/src/disk/store.Store -> @+sectors:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @+sector:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @+r:List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Desc> -> @+w:List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Desc> -> @+room:U32 -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, U32>
OUT on a store that may be read-only: IOERR without writing when ro.
def Blk.flush source · line 350 · raw
@-R:Type -> @+st:0x51718d1816cd36f20955e9590377c5e5/src/disk/store.Store -> @+w:List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Desc> -> @+room:U32 -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, U32>
FLUSH: makes earlier writes durable.
def Blk.discard.go source · line 358 · raw
@-R:Type -> @+bs:List<&2, U32> -> @st:0x51718d1816cd36f20955e9590377c5e5/src/disk/store.Store -> @+sectors:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @+w:List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Desc> -> @+room:U32 -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, U32>
DISCARD: the readable data after the header, 1 to discard_max_seg segments; read through Bend (16 bytes each), checked, then freed.
def Blk.discard.read source · line 365 · raw
@-R:Type -> @ok:Bool -> @st:0x51718d1816cd36f20955e9590377c5e5/src/disk/store.Store -> @+sectors:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @+ss:List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Iov> -> @+w:List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Desc> -> @+room:U32 -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, U32>
def Blk.discard source · line 372 · raw
@-R:Type -> @ro:Bool -> @st:0x51718d1816cd36f20955e9590377c5e5/src/disk/store.Store -> @+sectors:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @+r:List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Desc> -> @+w:List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Desc> -> @+room:U32 -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, U32>
def Blk.wz.go source · line 383 · raw
@-R:Type -> @+bs:List<&2, U32> -> @md:Maybe<&2, U32> -> @+st:0x51718d1816cd36f20955e9590377c5e5/src/disk/store.Store -> @+sectors:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @+w:List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Desc> -> @+room:U32 -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, U32>
WRITE_ZEROES: segments as DISCARD's, checked, then zeroed on the raw image (UNSUPP on a read-only or qcow2 store: not offered there).
def Blk.wz.read source · line 395 · raw
@-R:Type -> @ok:Bool -> @+st:0x51718d1816cd36f20955e9590377c5e5/src/disk/store.Store -> @+sectors:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @+ss:List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Iov> -> @+w:List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Desc> -> @+room:U32 -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, U32>
def Blk.write_zeroes source · line 402 · raw
@-R:Type -> @ro:Bool -> @+st:0x51718d1816cd36f20955e9590377c5e5/src/disk/store.Store -> @+sectors:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @+r:List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Desc> -> @+w:List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Desc> -> @+room:U32 -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, U32>
def Blk.exec.kind source · line 411 · raw
@-R:Type -> @k:Nat -> @ro:Bool -> @st:0x51718d1816cd36f20955e9590377c5e5/src/disk/store.Store -> @+sectors:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @+sector:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @+r:List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Desc> -> @+w:List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Desc> -> @+room:U32 -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, U32>
def Blk.exec.go source · line 433 · raw
@-R:Type -> @short:Bool -> @+hdr:List<&2, U32> -> @ro:Bool -> @st:0x51718d1816cd36f20955e9590377c5e5/src/disk/store.Store -> @sectors:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @r:List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Desc> -> @+w:List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Desc> -> @+room:U32 -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, U32>
Runs a request whose first 16 readable bytes are hdr {type, reserved, sector}; a shorter header is an IOERR.
def Blk.exec source · line 444 · raw
@-R:Type -> @+hdr:List<&2, U32> -> @ro:Bool -> @st:0x51718d1816cd36f20955e9590377c5e5/src/disk/store.Store -> @sectors:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @r:List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Desc> -> @+w:List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Desc> -> @+room:U32 -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, U32>
def Blk.answer_chain source · line 449 · raw
@-R:Type -> @empty:Bool -> @ro:Bool -> @st:0x51718d1816cd36f20955e9590377c5e5/src/disk/store.Store -> @sectors:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @+r:List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Desc> -> @+w:List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Desc> -> @+room:U32 -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, U32>
def Blk.serve_chain source · line 464 · raw
@-R:Type -> @ro:Bool -> @st:0x51718d1816cd36f20955e9590377c5e5/src/disk/store.Store -> @sectors:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @q:0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq -> @c:0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Chain -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq>
Serves one request chain and pushes it used. A chain without a writable byte has no status to answer in: it is returned untouched, used length 0. The header is read through Bend; the data moves between the disk and the chain's memory on the host (Op.disk_to_ram, Op.ram_to_disk).
def Blk.step source · line 474 · raw
@-R:Type -> @ro:Bool -> @st:0x51718d1816cd36f20955e9590377c5e5/src/disk/store.Store -> @sectors:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @r:Pair(0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq, Maybe<&2, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Chain>) -> @used:Bool -> @k:(@_:0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, Pair(0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq, Bool)>) -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, Pair(0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq, Bool)>
After a pop: stops on an empty queue, else serves the chain and continues with k.
def Blk.go source · line 485 · raw
@fuel:Nat -> @-R:Type -> @+ro:Bool -> @+st:0x51718d1816cd36f20955e9590377c5e5/src/disk/store.Store -> @+sectors:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @q:0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq -> @used:Bool -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, Pair(0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq, Bool)>
Pops and serves requests, at most fuel of them; used tells whether any was.
def Blk.serve_store source · line 497 · raw
@-R:Type -> @st:0x51718d1816cd36f20955e9590377c5e5/src/disk/store.Store -> @sectors:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @ro:Bool -> @q:0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, Pair(0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq, Bool)>
Serves every available request of the queue (at most num per call) on a store (a raw image, or qcow2 over its backing files) that is read-only when ro. Answers the queue and whether any chain was used.
def Blk.serve source · line 503 · raw
@-R:Type -> @disk:U32 -> @sectors:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @ro:Bool -> @q:0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, Pair(0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq, Bool)>
Blk.serve_store on a raw disk image.
def Blk.process source · line 507 · raw
@-R:Type -> @disk:U32 -> @sectors:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @q:0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, Pair(0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq, Bool)>
Blk.serve on a read-write disk.
def Blk.pack.id_bytes source · line 520 · raw
@name:String -> List<&2, U32>
def Blk.pack.in source · line 523 · raw
@-R:Type -> @ok:Bool -> @+p:0x51718d1816cd36f20955e9590377c5e5/src/disk/pack.Pack -> @+sector:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @+w:List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Desc> -> @+room:U32 -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, U32>
def Blk.pack.kind source · line 534 · raw
@-R:Type -> @k:Nat -> @+p:0x51718d1816cd36f20955e9590377c5e5/src/disk/pack.Pack -> @+sector:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @+w:List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Desc> -> @+room:U32 -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, U32>
def Blk.pack.exec source · line 548 · raw
@-R:Type -> @short:Bool -> @+hdr:List<&2, U32> -> @+p:0x51718d1816cd36f20955e9590377c5e5/src/disk/pack.Pack -> @+w:List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Desc> -> @+room:U32 -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, U32>
def Blk.pack.answer source · line 555 · raw
@-R:Type -> @empty:Bool -> @+p:0x51718d1816cd36f20955e9590377c5e5/src/disk/pack.Pack -> @+r:List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Desc> -> @+w:List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Desc> -> @+room:U32 -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, U32>
def Blk.pack.chain source · line 564 · raw
@-R:Type -> @+p:0x51718d1816cd36f20955e9590377c5e5/src/disk/pack.Pack -> @q:0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq -> @c:0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Chain -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq>
def Blk.pack.step source · line 572 · raw
@-R:Type -> @+p:0x51718d1816cd36f20955e9590377c5e5/src/disk/pack.Pack -> @r:Pair(0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq, Maybe<&2, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Chain>) -> @used:Bool -> @k:(@_:0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, Pair(0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq, Bool)>) -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, Pair(0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq, Bool)>
def Blk.pack.go source · line 579 · raw
@fuel:Nat -> @-R:Type -> @+p:0x51718d1816cd36f20955e9590377c5e5/src/disk/pack.Pack -> @q:0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq -> @used:Bool -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, Pair(0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq, Bool)>
def Blk.serve_pack source · line 589 · raw
@-R:Type -> @p:0x51718d1816cd36f20955e9590377c5e5/src/disk/pack.Pack -> @q:0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, Pair(0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq, Bool)>
Serves every available request of a pack's queue (at most num per call).