udi_fs.h

Contains the filesystem driver interface details

Author

Marcel Sondaar

License

Public Domain

The filesystem metalanguage is split in several separate metalanguages, each covering a portion of potential features the filesystem might provide

Summary
udi_fs.hContains the filesystem driver interface details
udi_fs_blockreadThis metalanguage supports opening files by name and returning blocklists of the file’s locations on disk.
udi_fs_blockread_bind_cb_tContains a mostly empty control block to initialize the read functionality
Variables
gcbThe main control block
Functions
udi_fs_blockread_bind_reqfunction pointer prototype for connecting to a block device
udi_fs_blockread_bind_ackfunction pointer prototype for acknowledging a connection request
udi_fs_blockread_unbind_reqfunction pointer prototype for disconnecting a filesystem driver
udi_fs_blockread_unbind_ackfunction pointer prototype for disconnecting to a filesystem driver
udi_fs_blockread_filename_cb_tContains a cb used for filename transfers
Variables
gcbThe main control block
bufbuffer holding the filename
Functions
udi_fs_blockread_stat_reqfunction pointer prototype for requesting file presence and size
udi_fs_blockread_stat_ackfunction pointer prototype for requesting file presence and size
udi_fs_blockread_stat_nakfunction pointer prototype for returning a read error
udi_fs_blockread_open_reqfunction pointer prototype for opening a file
udi_fs_blockread_open_ackfunction pointer prototype for returning success on opening a file
udi_fs_blockread_open_nakfunction pointer prototype for file opening failure
udi_fs_blockread_close_cb_tContains a cb used for file closing
Variables
gcbThe main control block
handlethe file handle
Functions
udi_fs_blockread_close_reqfunction pointer prototype for closing a file
udi_fs_blockread_close_ackfunction pointer prototype for closing a file
udi_fs_blockread_map_cb_tContains a cb used for file closing
Variables
gcbThe main control block
handlethe file handle
bufthe buffer to place mappings in
off_looffset into the file to map
len_lolength of the data to map
Functions
udi_fs_blockread_map_reqfunction pointer prototype for closing a file
udi_fs_blockread_map_ackfunction pointer prototype for closing a file
udi_fs_blockread_map_nakfunction pointer prototype for closing a file
udi_fs_blockread_provider_ops_tThe mapped filesystem mapped read entry points (provider side)
udi_fs_blockread_ops_tThe mapped filesystem mapped read metalanguage entry points (client side)
udi_fs_blockrwThis metalanguage supports adding, modifying and reading files by name, returing blocklists corresponding to the locations on disk.
udi_fs_blockrw_bind_cb_tContains a mostly empty control block to initialize the read-write functionality
Variables
gcbThe main control block
Functions
udi_fs_blockrw_bind_reqfunction pointer prototype for connecting to a block device
udi_fs_blockrw_bind_ackfunction pointer prototype for acknowledging a connection request

udi_fs_blockread

This metalanguage supports opening files by name and returning blocklists of the file’s locations on disk.

udi_fs_blockread_bind_cb_t

Contains a mostly empty control block to initialize the read functionality

Summary
Variables
gcbThe main control block
Functions
udi_fs_blockread_bind_reqfunction pointer prototype for connecting to a block device
udi_fs_blockread_bind_ackfunction pointer prototype for acknowledging a connection request
udi_fs_blockread_unbind_reqfunction pointer prototype for disconnecting a filesystem driver
udi_fs_blockread_unbind_ackfunction pointer prototype for disconnecting to a filesystem driver

Variables

gcb

udi_cb_t gcb

The main control block

Functions

udi_fs_blockread_bind_req

typedef void udi_fs_blockread_bind_req_op_t (udi_fs_blockread_bind_cb_t *cb)

function pointer prototype for connecting to a block device

in

cbA pointer to a udi_fs_blockread_bind_cb_t

udi_fs_blockread_bind_ack

typedef void udi_fs_blockread_bind_ack_op_t (udi_fs_blockread_bind_cb_t *cb,
udi_status_t status)

function pointer prototype for acknowledging a connection request

in

cbA pointer to a udi_fs_blockread_bind_cb_t
statusA status value, usually to indicate if a filesystem was correctly mounted.

udi_fs_blockread_unbind_req

typedef void udi_fs_blockread_unbind_req_op_t (udi_fs_blockread_bind_cb_t *cb)

function pointer prototype for disconnecting a filesystem driver

in

cbA pointer to a udi_block_bind_cb_t

udi_fs_blockread_unbind_ack

typedef void udi_fs_blockread_unbind_ack_op_t (udi_fs_blockread_bind_cb_t *cb)

function pointer prototype for disconnecting to a filesystem driver

in

cbA pointer to a udi_block_bind_cb_t

udi_fs_blockread_filename_cb_t

Contains a cb used for filename transfers

Summary
Variables
gcbThe main control block
bufbuffer holding the filename
Functions
udi_fs_blockread_stat_reqfunction pointer prototype for requesting file presence and size
udi_fs_blockread_stat_ackfunction pointer prototype for requesting file presence and size
udi_fs_blockread_stat_nakfunction pointer prototype for returning a read error
udi_fs_blockread_open_reqfunction pointer prototype for opening a file
udi_fs_blockread_open_ackfunction pointer prototype for returning success on opening a file
udi_fs_blockread_open_nakfunction pointer prototype for file opening failure

Variables

gcb

udi_cb_t gcb

The main control block

buf

udi_buf_t * buf

buffer holding the filename

Functions

udi_fs_blockread_stat_req

typedef void udi_fs_blockread_stat_req_op_t (udi_fs_blockread_filename_cb_t *cb)

function pointer prototype for requesting file presence and size

in

cbA pointer to a udi_fs_blockread_filename_cb_t

udi_fs_blockread_stat_ack

typedef void udi_fs_blockread_stat_ack_op_t (
   udi_fs_blockread_filename_cb_t *cb,
   udi_ubit32_t size_lo,
   udi_ubit32_t size_hi
)

function pointer prototype for requesting file presence and size

in

cbA pointer to a udi_fs_blockread_filename_cb_t
size_lobottom 32 bits of filesize
size_hitop 32 bits of filesize

udi_fs_blockread_stat_nak

typedef void udi_fs_blockread_stat_nak_op_t (
   udi_fs_blockread_filename_cb_t *cb,
   udi_status_t status
)

function pointer prototype for returning a read error

in

cbA pointer to a udi_fs_blockread_filename_cb_t
statuscause of the failure

udi_fs_blockread_open_req

typedef void udi_fs_blockread_open_req_op_t (udi_fs_blockread_filename_cb_t *cb)

function pointer prototype for opening a file

in

cbA pointer to a udi_fs_blockread_filename_cb_t

udi_fs_blockread_open_ack

typedef void udi_fs_blockread_open_ack_op_t (
   udi_fs_blockread_filename_cb_t *cb,
   udi_index_t handle
)

function pointer prototype for returning success on opening a file

in

cbA pointer to a udi_fs_blockread_filename_cb_t
handlea reference for the file for later use

udi_fs_blockread_open_nak

typedef void udi_fs_blockread_open_nak_op_t (
   udi_fs_blockread_filename_cb_t *cb,
   udi_status_t handle
)

function pointer prototype for file opening failure

in

cbA pointer to a udi_fs_blockread_filename_cb_t
handlea reference for the file for later use

udi_fs_blockread_close_cb_t

Contains a cb used for file closing

Summary
Variables
gcbThe main control block
handlethe file handle
Functions
udi_fs_blockread_close_reqfunction pointer prototype for closing a file
udi_fs_blockread_close_ackfunction pointer prototype for closing a file

Variables

gcb

udi_cb_t gcb

The main control block

handle

udi_index_t handle

the file handle

Functions

udi_fs_blockread_close_req

typedef void udi_fs_blockread_close_req_op_t (udi_fs_blockread_close_cb_t *cb)

function pointer prototype for closing a file

in

cbA pointer to a udi_fs_blockread_filename_cb_t

udi_fs_blockread_close_ack

typedef void udi_fs_blockread_close_ack_op_t (udi_fs_blockread_close_cb_t *cb)

function pointer prototype for closing a file

in

cbA pointer to a udi_fs_blockread_filename_cb_t

udi_fs_blockread_map_cb_t

Contains a cb used for file closing

Summary
Variables
gcbThe main control block
handlethe file handle
bufthe buffer to place mappings in
off_looffset into the file to map
len_lolength of the data to map
Functions
udi_fs_blockread_map_reqfunction pointer prototype for closing a file
udi_fs_blockread_map_ackfunction pointer prototype for closing a file
udi_fs_blockread_map_nakfunction pointer prototype for closing a file

Variables

gcb

udi_cb_t gcb

The main control block

handle

udi_index_t handle

the file handle

buf

udi_buf_t * buf

the buffer to place mappings in

off_lo

udi_ubit32_t off_lo

offset into the file to map

len_lo

udi_ubit32_t len_lo

length of the data to map

Functions

udi_fs_blockread_map_req

typedef void udi_fs_blockread_map_req_op_t (udi_fs_blockread_map_cb_t *cb)

function pointer prototype for closing a file

in

cbA pointer to a udi_fs_blockread_map_cb_t

udi_fs_blockread_map_ack

typedef void udi_fs_blockread_map_ack_op_t (udi_fs_blockread_map_cb_t *cb)

function pointer prototype for closing a file

in

cbA pointer to a udi_fs_blockread_map_cb_t

udi_fs_blockread_map_nak

typedef void udi_fs_blockread_map_nak_op_t (udi_fs_blockread_map_cb_t *cb,
udi_status_t status)

function pointer prototype for closing a file

in

cbA pointer to a udi_fs_blockread_map_cb_t
statuscause of the failure

udi_fs_blockread_provider_ops_t

The mapped filesystem mapped read entry points (provider side)

udi_fs_blockread_ops_t

The mapped filesystem mapped read metalanguage entry points (client side)

Summary
udi_fs_blockrwThis metalanguage supports adding, modifying and reading files by name, returing blocklists corresponding to the locations on disk.

udi_fs_blockrw

This metalanguage supports adding, modifying and reading files by name, returing blocklists corresponding to the locations on disk.

udi_fs_blockrw_bind_cb_t

Contains a mostly empty control block to initialize the read-write functionality

Summary
Variables
gcbThe main control block
Functions
udi_fs_blockrw_bind_reqfunction pointer prototype for connecting to a block device
udi_fs_blockrw_bind_ackfunction pointer prototype for acknowledging a connection request

Variables

gcb

udi_cb_t gcb

The main control block

Functions

udi_fs_blockrw_bind_req

typedef void udi_fs_blockrw_bind_req_op_t (udi_fs_blockrw_bind_cb_t *cb)

function pointer prototype for connecting to a block device

in

cbA pointer to a udi_fs_blockrw_bind_cb_t

udi_fs_blockrw_bind_ack

typedef void udi_fs_blockrw_bind_ack_op_t (udi_fs_blockrw_bind_cb_t *cb,
udi_ubit32_t access,
udi_status_t status)

function pointer prototype for acknowledging a connection request

in

cbA pointer to a udi_fs_blockrw_bind_cb_t
accessA series of UDI_FS_MOUNT_* flags indicating the operations possible.
statusA status value, usually to indicate if a filesystem was correctly mounted.
udi_cb_t gcb
The main control block
typedef void udi_fs_blockread_bind_req_op_t (udi_fs_blockread_bind_cb_t *cb)
function pointer prototype for connecting to a block device
typedef void udi_fs_blockread_bind_ack_op_t (udi_fs_blockread_bind_cb_t *cb,
udi_status_t status)
function pointer prototype for acknowledging a connection request
typedef void udi_fs_blockread_unbind_req_op_t (udi_fs_blockread_bind_cb_t *cb)
function pointer prototype for disconnecting a filesystem driver
typedef void udi_fs_blockread_unbind_ack_op_t (udi_fs_blockread_bind_cb_t *cb)
function pointer prototype for disconnecting to a filesystem driver
udi_cb_t gcb
The main control block
udi_buf_t * buf
buffer holding the filename
typedef void udi_fs_blockread_stat_req_op_t (udi_fs_blockread_filename_cb_t *cb)
function pointer prototype for requesting file presence and size
typedef void udi_fs_blockread_stat_ack_op_t (
   udi_fs_blockread_filename_cb_t *cb,
   udi_ubit32_t size_lo,
   udi_ubit32_t size_hi
)
function pointer prototype for requesting file presence and size
typedef void udi_fs_blockread_stat_nak_op_t (
   udi_fs_blockread_filename_cb_t *cb,
   udi_status_t status
)
function pointer prototype for returning a read error
typedef void udi_fs_blockread_open_req_op_t (udi_fs_blockread_filename_cb_t *cb)
function pointer prototype for opening a file
typedef void udi_fs_blockread_open_ack_op_t (
   udi_fs_blockread_filename_cb_t *cb,
   udi_index_t handle
)
function pointer prototype for returning success on opening a file
typedef void udi_fs_blockread_open_nak_op_t (
   udi_fs_blockread_filename_cb_t *cb,
   udi_status_t handle
)
function pointer prototype for file opening failure
udi_cb_t gcb
The main control block
udi_index_t handle
the file handle
typedef void udi_fs_blockread_close_req_op_t (udi_fs_blockread_close_cb_t *cb)
function pointer prototype for closing a file
typedef void udi_fs_blockread_close_ack_op_t (udi_fs_blockread_close_cb_t *cb)
function pointer prototype for closing a file
udi_cb_t gcb
The main control block
udi_index_t handle
the file handle
udi_buf_t * buf
the buffer to place mappings in
udi_ubit32_t off_lo
offset into the file to map
udi_ubit32_t len_lo
length of the data to map
typedef void udi_fs_blockread_map_req_op_t (udi_fs_blockread_map_cb_t *cb)
function pointer prototype for closing a file
typedef void udi_fs_blockread_map_ack_op_t (udi_fs_blockread_map_cb_t *cb)
function pointer prototype for closing a file
typedef void udi_fs_blockread_map_nak_op_t (udi_fs_blockread_map_cb_t *cb,
udi_status_t status)
function pointer prototype for closing a file
udi_cb_t gcb
The main control block
typedef void udi_fs_blockrw_bind_req_op_t (udi_fs_blockrw_bind_cb_t *cb)
function pointer prototype for connecting to a block device
typedef void udi_fs_blockrw_bind_ack_op_t (udi_fs_blockrw_bind_cb_t *cb,
udi_ubit32_t access,
udi_status_t status)
function pointer prototype for acknowledging a connection request
Contains a mostly empty control block to initialize the read functionality
Contains the operations of a read/write transaction
Contains a cb used for filename transfers
Contains a cb used for file closing
Contains a mostly empty control block to initialize the read-write functionality