Motr
M0
|
#include <fop.h>
Data Fields | |
const char * | ft_name |
struct m0_tlink | ft_linkage |
const struct m0_fop_type_ops * | ft_ops |
const struct m0_xcode_type * | ft_xt |
struct m0_fom_type | ft_fom_type |
struct m0_rpc_item_type | ft_rpc_item_type |
uint64_t | ft_magix |
Fop format
A fop type contains as its part a "fop format". A fop format is a description of structure of data in a fop instance. Fop format describes fop instance data structure as a tree of fields. Leaves of this tree are fields of "atomic" types (VOID, BYTE, U32 and U64) and non-leaf nodes are "aggregation fields": record, union, sequence or typedef.
The key point of fop formats is that data structure description can be analysed at run-time by using the facilities provided by xcode module (
Fop formats are introduced in "description files", usually having .ff extension. See xcode/ff2c/sample.ff for an example. fop format description file defines instances of struct m0_xcode_type which are generated by ff2c compiler
During build process, "description file" is processed by ff2c compiler. xcode provides interfaces to iterate over hierarchy of such descriptors and to associate user defined state with types and fields.
There is an instance of m0_fop_type for "make directory" command, an instance for "write", "truncate", etc.
struct m0_fom_type ft_fom_type |
struct m0_tlink ft_linkage |
const struct m0_fop_type_ops* ft_ops |
struct m0_rpc_item_type ft_rpc_item_type |
const struct m0_xcode_type* ft_xt |