Motr
M0
|
Data Structures | |
struct | m0_stob_io_desc |
struct | m0_io_fom_cob_rw |
struct | m0_io_fom_cob_rw_state_transition |
Functions | |
M0_TL_DESCR_DEFINE (stobio, "STOB I/O", static, struct m0_stob_io_desc, siod_linkage, siod_magic, M0_STOB_IO_DESC_LINK_MAGIC, M0_STOB_IO_DESC_HEAD_MAGIC) | |
M0_TL_DEFINE (stobio, static, struct m0_stob_io_desc) | |
M0_TL_DESCR_DEFINE (netbufs, "Aquired net buffers", static, struct m0_net_buffer, nb_extern_linkage, nb_magic, M0_NET_BUFFER_LINK_MAGIC, M0_IOS_NET_BUFFER_HEAD_MAGIC) | |
M0_TL_DEFINE (netbufs, static, struct m0_net_buffer) | |
M0_TL_DESCR_DEFINE (rpcbulkbufs, "rpc bulk buffers", static, struct m0_rpc_bulk_buf, bb_link, bb_magic, M0_RPC_BULK_BUF_MAGIC, M0_RPC_BULK_MAGIC) | |
M0_TL_DEFINE (rpcbulkbufs, static, struct m0_rpc_bulk_buf) | |
M0_TL_DESCR_DECLARE (bufferpools, M0_EXTERN) | |
M0_TL_DECLARE (bufferpools, M0_EXTERN, struct m0_rios_buffer_pool) | |
M0_INTERNAL bool | m0_is_read_fop (const struct m0_fop *fop) |
M0_INTERNAL bool | m0_is_write_fop (const struct m0_fop *fop) |
M0_INTERNAL bool | m0_is_io_fop (const struct m0_fop *fop) |
M0_INTERNAL struct m0_fop_cob_rw * | io_rw_get (struct m0_fop *fop) |
M0_INTERNAL struct m0_fop_cob_rw_reply * | io_rw_rep_get (struct m0_fop *fop) |
M0_INTERNAL bool | m0_is_cob_create_fop (const struct m0_fop *fop) |
M0_INTERNAL bool | m0_is_cob_delete_fop (const struct m0_fop *fop) |
static int | m0_io_fom_cob_rw_create (struct m0_fop *fop, struct m0_fom **out, struct m0_reqh *reqh) |
static int | m0_io_fom_cob_rw_tick (struct m0_fom *fom) |
static void | m0_io_fom_cob_rw_fini (struct m0_fom *fom) |
static size_t | m0_io_fom_cob_rw_locality_get (const struct m0_fom *fom) |
M0_INTERNAL const char * | m0_io_fom_cob_rw_service_name (struct m0_fom *fom) |
static bool | m0_io_fom_cob_rw_invariant (const struct m0_io_fom_cob_rw *io) |
static int | net_buffer_acquire (struct m0_fom *) |
static int | io_prepare (struct m0_fom *) |
static int | io_launch (struct m0_fom *) |
static int | io_finish (struct m0_fom *) |
static int | io_sync (struct m0_fom *fom) |
static int | zero_copy_initiate (struct m0_fom *) |
static int | zero_copy_finish (struct m0_fom *) |
static int | net_buffer_release (struct m0_fom *) |
static int | nbuf_release_done (struct m0_fom *fom, int still_required) |
static int | cob_bytecount_increment (struct m0_cob *cob, struct m0_cob_bckey *key, uint64_t bytecount, struct m0_be_tx *tx) |
static void | io_fom_addb2_descr (struct m0_fom *fom) |
static bool | m0_stob_io_desc_invariant (const struct m0_stob_io_desc *stobio_desc) |
static void | stobio_complete_cb (struct m0_fom_callback *cb) |
M0_INTERNAL int | m0_io_cob_create (struct m0_cob_domain *cdom, struct m0_fid *fid, struct m0_fid *pver, uint64_t lid, struct m0_be_tx *tx) |
static struct m0_cob_domain * | fom_cdom (struct m0_fom *fom) |
M0_INTERNAL int | m0_io_cob_stob_create (struct m0_fom *fom, struct m0_cob_domain *cdom, struct m0_fid *fid, struct m0_fid *pver, uint64_t lid, bool crow, struct m0_cob **out) |
static int | io_fom_cob2file (struct m0_fom *fom, struct m0_fid *fid, struct m0_file **out) |
static int | align_bufvec (struct m0_fom *fom, struct m0_bufvec *obuf, struct m0_bufvec *ibuf, m0_bcount_t ivec_count, uint32_t bshift) |
static int | fom_cob_locate (struct m0_fom *fom) |
static int | stob_object_find (struct m0_fom *fom) |
static void | stio_desc_fini (struct m0_stob_io_desc *stio_desc) |
M0_INTERNAL uint64_t | m0_io_size (struct m0_stob_io *sio, uint32_t bshift) |
static int | indexvec_wire2mem (struct m0_fom *fom) |
static int | stob_io_create (struct m0_fom *fom) |
static void | stob_io_destroy (struct m0_fom *fom) |
static void | stob_be_credit (struct m0_fom *fom) |
Variables | |
enum m0_avi_ios_io_labels | M0_XCA_ENUM |
struct m0_fom_ops | ops |
const struct m0_fom_type_ops | io_fom_type_ops |
static struct m0_io_fom_cob_rw_state_transition | io_fom_read_st [] |
static const struct m0_io_fom_cob_rw_state_transition | io_fom_write_st [] |
struct m0_sm_state_descr | io_phases [] |
struct m0_sm_trans_descr | io_phases_trans [] |
struct m0_sm_conf | io_conf |
Fop state machine for IO operations
FOP state machines for various IO operations like
anonymous enum |
enum m0_avi_ios_io_labels |
Definition at line 38 of file io_addb2.h.
The various phases for I/O FOM. complete FOM and reqh infrastructure is in place.
|
static |
Copy aligned bufvec segments addresses from net buffer to stob bufvec. STOB I/O expects exact same number of bufvec as index vecs for I/O request. This function copies segment from network buffer with size same as ivec_count.
fom | file operation machine instance. |
obuf | pointer to bufvec from stobio object. |
ibuf | pointer to bufve from network buffer from buffer pool. |
ivec_count | number of vectors for stob I/O request. |
bshift | shift value for current stob to align bufvecs. |
Definition at line 1035 of file io_foms.c.
|
static |
|
static |
|
static |
|
static |
|
static |
This function finish STOB I/O. It's check for STOB I/O result and return back STOB instance.
fom | instance file operation machine under execution |
Definition at line 1899 of file io_foms.c.
|
static |
|
static |
Launch STOB I/O Helper function to launch STOB I/O. This function initiates STOB I/O for all index vecs. STOB I/O signaled on channel in m0_stob_io::si_wait. There is a clink for each STOB I/O waiting on respective m0_stob_io::si_wait. For every STOB I/O completion call-back is launched to check its results and mark complete. After all STOB I/O completes call-back function send signal to FOM so that FOM gets out of wait-queue and placed in run-queue.
fom | file operation machine |
Definition at line 1696 of file io_foms.c.
|
static |
M0_INTERNAL struct m0_fop_cob_rw * io_rw_get | ( | struct m0_fop * | fop | ) |
M0_INTERNAL struct m0_fop_cob_rw_reply * io_rw_rep_get | ( | struct m0_fop * | fop | ) |
|
static |
M0_INTERNAL int m0_io_cob_create | ( | struct m0_cob_domain * | cdom, |
struct m0_fid * | fid, | ||
struct m0_fid * | pver, | ||
uint64_t | lid, | ||
struct m0_be_tx * | tx | ||
) |
M0_INTERNAL int m0_io_cob_stob_create | ( | struct m0_fom * | fom, |
struct m0_cob_domain * | ios_cdom, | ||
struct m0_fid * | fid, | ||
struct m0_fid * | pver, | ||
uint64_t | lid, | ||
bool | crow, | ||
struct m0_cob ** | out | ||
) |
If cob of different version exists, it will delete it and recreate the cob with pool version pver. If crow is true, it will create the cob if it does not exist.
Definition at line 951 of file io_foms.c.
|
static |
Create and initiate I/O FOM and return generic struct m0_fom Find the corresponding fom_type and associate it with m0_fom. Associate fop with fom type.
fop | file operation packet need to process |
out | file operation machine need to allocate and initiate |
Definition at line 1144 of file io_foms.c.
|
static |
|
static |
|
static |
M0_INTERNAL const char * m0_io_fom_cob_rw_service_name | ( | struct m0_fom * | fom | ) |
|
static |
State Transition function for I/O operation that executes on data server.
fom | instance file operation machine under execution |
XXX: Overlapping cob extentds are not accounted for during cob overwrite. IF a cob is overwritten, it will make cob size inaccurate.
Definition at line 2233 of file io_foms.c.
M0_INTERNAL uint64_t m0_io_size | ( | struct m0_stob_io * | sio, |
uint32_t | bshift | ||
) |
M0_INTERNAL bool m0_is_cob_create_fop | ( | const struct m0_fop * | fop | ) |
M0_INTERNAL bool m0_is_cob_delete_fop | ( | const struct m0_fop * | fop | ) |
M0_INTERNAL bool m0_is_io_fop | ( | const struct m0_fop * | fop | ) |
M0_INTERNAL bool m0_is_read_fop | ( | const struct m0_fop * | fop | ) |
M0_INTERNAL bool m0_is_write_fop | ( | const struct m0_fop * | fop | ) |
|
static |
M0_TL_DECLARE | ( | bufferpools | , |
M0_EXTERN | , | ||
struct m0_rios_buffer_pool | |||
) |
M0_TL_DEFINE | ( | stobio | , |
static | , | ||
struct m0_stob_io_desc | |||
) |
M0_TL_DEFINE | ( | netbufs | , |
static | , | ||
struct m0_net_buffer | |||
) |
M0_TL_DEFINE | ( | rpcbulkbufs | , |
static | , | ||
struct m0_rpc_bulk_buf | |||
) |
M0_TL_DESCR_DECLARE | ( | bufferpools | , |
M0_EXTERN | |||
) |
M0_TL_DESCR_DEFINE | ( | stobio | , |
"STOB I/O" | , | ||
static | , | ||
struct m0_stob_io_desc | , | ||
siod_linkage | , | ||
siod_magic | , | ||
M0_STOB_IO_DESC_LINK_MAGIC | , | ||
M0_STOB_IO_DESC_HEAD_MAGIC | |||
) |
M0_TL_DESCR_DEFINE | ( | netbufs | , |
"Aquired net buffers" | , | ||
static | , | ||
struct m0_net_buffer | , | ||
nb_extern_linkage | , | ||
nb_magic | , | ||
M0_NET_BUFFER_LINK_MAGIC | , | ||
M0_IOS_NET_BUFFER_HEAD_MAGIC | |||
) |
M0_TL_DESCR_DEFINE | ( | rpcbulkbufs | , |
"rpc bulk buffers" | , | ||
static | , | ||
struct m0_rpc_bulk_buf | , | ||
bb_link | , | ||
bb_magic | , | ||
M0_RPC_BULK_BUF_MAGIC | , | ||
M0_RPC_BULK_MAGIC | |||
) |
|
static |
|
static |
Acquire network buffers. Gets as many network buffer as it can to process io request. It needs at least one network buffer to start io processing. If not able to get single buffer, FOM wait for buffer pool to become non-empty.
If acquired buffers are less than number of fop descriptors then I/O processing will be done by batch.
fom | file operation machine instance. |
Cache buffer pool pointer with FOM object.
Definition at line 1305 of file io_foms.c.
|
static |
Release network buffer. Return back network buffer to buffer pool. If acquired buffers are more than the remaining descriptors release extra buffers so that other FOM can use.
fom | file operation machine. |
Definition at line 1428 of file io_foms.c.
|
static |
|
static |
|
static |
CKSUM_TODO: Check this and use function call
M0_ASSERT(rwfop->crw_di_data_cksum.b_nob == 0);
M0_ASSERT(rwfop->crw_di_data_cksum.b_addr == NULL);
Get the cksum nob expected for given stio
assign checksum buffer to repsective stob
Increment the current cksum count
Definition at line 2035 of file io_foms.c.
|
static |
|
static |
|
static |
Call back function which gets invoked on a single STOB I/O complete. This function check for STOB I/O list and remove stobio entry from list for completed STOB I/O. After completion of all STOB I/O it sends signal to FOM so that it can again put into run queue.
cb | fom callback for completed STOB I/O entry |
Definition at line 864 of file io_foms.c.
|
static |
|
static |
Initiate zero-copy Initiates zero-copy for batch of descriptors. And wait for zero-copy to complete for all descriptors. Network layer signaled on m0_rpc_bulk::rb_chan on completion.
fom | file operation machine. |
Definition at line 1509 of file io_foms.c.
struct m0_sm_conf io_conf |
|
static |
const struct m0_fom_type_ops io_fom_type_ops |
I/O FOM type operation vector.
|
static |
struct m0_sm_state_descr io_phases[] |
struct m0_sm_trans_descr io_phases_trans[] |
enum m0_avi_ios_io_labels M0_XCA_ENUM |
struct m0_fom_ops ops |
I/O FOM operation vector.