mirage-block-lwt
Block signatures and implementations for MirageOS using Lwt
1024" x-on:close-sidebar="sidebar=window.innerWidth > 1024 && true">
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Library mirage-block-lwt
Fast Fold over the bytes of a block device
This functor use seek operations to perform fast folds over block devices.
Parameters
Signature
val mapped_s :
f:( 'a -> int64 -> Cstruct.t -> 'a Lwt.t ) ->
'a ->
A.t ->
( 'a, A.error ) result Lwt.t
Folds f
across data blocks read sequentially from a block device. In contrast to fold_s
, Fold.mapped_s
will use knowledge about the underlying disk structure and will skip blocks which it knows contain only zeroes. Note it may still read blocks containing zeroes. The function f
receives an accumulator, the sector number and a data buffer.
val unmapped_s :
f:( 'a -> int64 -> int64 -> 'a Lwt.t ) ->
'a ->
A.t ->
( 'a, A.error ) result Lwt.t
Folds f acc ofs len
across offsets of unmapped data blocks read sequentially from the block device. Fold.unmapped_s
will use knowledge about the underlying disk structure and will only fold across those blocks which are guaranteed to be zero i.e. those which are unmapped somehow.