Module Tjr_fs_shared.Blk_intf
Blk-related interfaces
The main choices:
- blk implementation (string, bytes, buf/bigarray etc)
- blk_id (presumably int, but perhaps a pair of (dev,int) )
- blk_dev (in mem, on file, on dev etc)
NOTE this is included in the top-level package module
module Blk_sz : sig ... end
type blk_sz
= Blk_sz.blk_sz
val blk_sz_4096 : Blk_sz.blk_sz
module Blk_id_as_int : sig ... end
This is a common instance of blk_id; we don't open it by default because we want most code to be independent of the exact repn. of blk_id
module Blk_ops : sig ... end
module Blk_dev_ops : sig ... end
include Blk_dev_ops
type ('blk_id, 'blk, 't) blk_dev_ops
=
{
blk_sz : blk_sz;
write : blk_id:'blk_id -> blk:'blk -> (unit, 't) Tjr_monad.m;
read : blk_id:'blk_id -> ('blk, 't) Tjr_monad.m;
write_many : ('blk_id * 'blk) list -> (unit, 't) Tjr_monad.m;
}
A block device: read and write blocks.
module Blk_allocator_ops : sig ... end
include Blk_allocator_ops
type ('blk_id, 'blk, 't, 'fd) blk_dev_impl
= < add_debug : ('blk_id, 'blk, 't) blk_dev_ops -> ('blk_id, 'blk, 't) blk_dev_ops; add_profiling : ('blk_id, 'blk, 't) blk_dev_ops -> ('blk_id, 'blk, 't) blk_dev_ops; with_ : blk_sz:blk_sz -> < from_fd : 'fd -> < blk_dev_ops : ('blk_id, 'blk, 't) blk_dev_ops; fd : 'fd; sync : unit -> (unit, 't) Tjr_monad.m; close : unit -> (unit, 't) Tjr_monad.m; >; >; >