Motr
M0
|
#include "motr/client.h"
#include "motr/pg.h"
#include "motr/io.h"
#include "lib/trace.h"
#include "lib/finject.h"
Go to the source code of this file.
Functions | |
M0_INTERNAL bool | addr_is_network_aligned (void *addr) |
M0_INTERNAL uint64_t | obj_buffer_size (const struct m0_obj *obj) |
M0_INTERNAL uint64_t | m0__page_size (const struct m0_op_io *ioo) |
M0_INTERNAL uint64_t | page_nr (m0_bcount_t size, struct m0_obj *obj) |
M0_INTERNAL uint32_t | layout_n (struct m0_pdclust_layout *play) |
M0_INTERNAL uint32_t | layout_k (struct m0_pdclust_layout *play) |
M0_INTERNAL uint64_t | page_id (m0_bindex_t offset, struct m0_obj *obj) |
M0_INTERNAL uint64_t | layout_unit_size (struct m0_pdclust_layout *play) |
M0_INTERNAL uint32_t | rows_nr (struct m0_pdclust_layout *play, struct m0_obj *obj) |
M0_INTERNAL uint64_t | data_size (struct m0_pdclust_layout *play) |
M0_INTERNAL struct m0_pdclust_instance * | pdlayout_instance (struct m0_layout_instance *li) |
M0_INTERNAL struct m0_pdclust_layout * | pdlayout_get (const struct m0_op_io *ioo) |
M0_INTERNAL struct m0_layout_instance * | layout_instance (const struct m0_op_io *ioo) |
M0_INTERNAL struct m0_parity_math * | parity_math (struct m0_op_io *ioo) |
M0_INTERNAL uint64_t | target_offset (uint64_t frame, struct m0_pdclust_layout *play, m0_bindex_t gob_offset) |
M0_INTERNAL uint64_t | group_id (m0_bindex_t index, m0_bcount_t dtsize) |
M0_INTERNAL m0_bcount_t | seg_endpos (const struct m0_indexvec *ivec, uint32_t i) |
M0_INTERNAL uint64_t | indexvec_page_nr (const struct m0_vec *vec, struct m0_obj *obj) |
M0_INTERNAL uint64_t | iomap_page_nr (const struct pargrp_iomap *map) |
M0_INTERNAL uint64_t | parity_units_page_nr (struct m0_pdclust_layout *play, struct m0_obj *obj) |
M0_INTERNAL uint64_t | round_down (uint64_t val, uint64_t size) |
M0_INTERNAL uint64_t | round_up (uint64_t val, uint64_t size) |
M0_INTERNAL uint32_t | io_desc_size (struct m0_net_domain *ndom) |
M0_INTERNAL uint32_t | io_seg_size (void) |
M0_INTERNAL void | page_pos_get (struct pargrp_iomap *map, m0_bindex_t index, m0_bindex_t grp_off, uint32_t *row, uint32_t *col) |
M0_INTERNAL m0_bindex_t | data_page_offset_get (struct pargrp_iomap *map, uint32_t row, uint32_t col) |
M0_INTERNAL uint32_t | ioreq_sm_state (const struct m0_op_io *ioo) |
M0_INTERNAL uint64_t | tolerance_of_level (struct m0_op_io *ioo, uint64_t lv) |
M0_INTERNAL bool | m0__is_update_op (struct m0_op *op) |
M0_INTERNAL bool | m0__is_read_op (struct m0_op *op) |
M0_INTERNAL struct m0_obj_attr * | m0_io_attr (struct m0_op_io *ioo) |
M0_INTERNAL bool addr_is_network_aligned | ( | void * | addr | ) |
M0_INTERNAL m0_bindex_t data_page_offset_get | ( | struct pargrp_iomap * | map, |
uint32_t | row, | ||
uint32_t | col | ||
) |
M0_INTERNAL uint64_t data_size | ( | struct m0_pdclust_layout * | play | ) |
M0_INTERNAL uint64_t group_id | ( | m0_bindex_t | index, |
m0_bcount_t | dtsize | ||
) |
M0_INTERNAL uint32_t io_desc_size | ( | struct m0_net_domain * | ndom | ) |
Calculates additional space for metadata in an io fop, use when adding rpc bulk buffer and data buffers. This is heavily based on m0t1fs/linux_kernel/file.cio_desc_size
ndom | The network domain the request will be sent on/to/through. |
Definition at line 205 of file utils.c.
M0_INTERNAL uint32_t io_seg_size | ( | void | ) |
How much space is required for per-segment on-wire metadata. This is heavily based on m0t1fs/linux_kernel/file.cio_seg_size
M0_INTERNAL uint64_t iomap_page_nr | ( | const struct pargrp_iomap * | map | ) |
M0_INTERNAL uint32_t ioreq_sm_state | ( | const struct m0_op_io * | ioo | ) |
Returns the state-machine:state of the provided io operation. This is heavily based on m0t1fs/linux_kernel/file.cioreq_sm_state
ioo | The IO Operation. |
M0_INTERNAL struct m0_layout_instance* layout_instance | ( | const struct m0_op_io * | ioo | ) |
M0_INTERNAL uint32_t layout_k | ( | struct m0_pdclust_layout * | play | ) |
M0_INTERNAL uint32_t layout_n | ( | struct m0_pdclust_layout * | play | ) |
M0_INTERNAL uint64_t layout_unit_size | ( | struct m0_pdclust_layout * | play | ) |
M0_INTERNAL bool m0__is_read_op | ( | struct m0_op * | op | ) |
M0_INTERNAL bool m0__is_update_op | ( | struct m0_op * | op | ) |
M0_INTERNAL uint64_t m0__page_size | ( | const struct m0_op_io * | ioo | ) |
M0_INTERNAL struct m0_obj_attr* m0_io_attr | ( | struct m0_op_io * | ioo | ) |
M0_INTERNAL uint64_t obj_buffer_size | ( | const struct m0_obj * | obj | ) |
M0_INTERNAL uint64_t page_id | ( | m0_bindex_t | offset, |
struct m0_obj * | obj | ||
) |
M0_INTERNAL uint64_t page_nr | ( | m0_bcount_t | size, |
struct m0_obj * | obj | ||
) |
Determines the number of object:blocks that are needed to hold the specified amount of data.
size | The size of the larger buffer. |
obj | The object that will hold this data. |
Definition at line 49 of file utils.c.
M0_INTERNAL void page_pos_get | ( | struct pargrp_iomap * | map, |
m0_bindex_t | index, | ||
m0_bindex_t | grp_off, | ||
uint32_t * | row, | ||
uint32_t * | col | ||
) |
M0_INTERNAL struct m0_parity_math* parity_math | ( | struct m0_op_io * | ioo | ) |
M0_INTERNAL uint64_t parity_units_page_nr | ( | struct m0_pdclust_layout * | play, |
struct m0_obj * | obj | ||
) |
M0_INTERNAL struct m0_pdclust_layout* pdlayout_get | ( | const struct m0_op_io * | ioo | ) |
Gets the parity layout from the provided IO operation. This is heavily based on m0t1fs/linux_kernel/file.cpdlayout_get
ioo | The IO Operation. |
Definition at line 111 of file utils.c.
M0_INTERNAL struct m0_pdclust_instance* pdlayout_instance | ( | struct m0_layout_instance * | li | ) |
M0_INTERNAL uint64_t round_down | ( | uint64_t | val, |
uint64_t | size | ||
) |
Rounds val down to the nearest multiple of size. This is heavily based on m0t1fs/linux_kernel/file.cround_down
val | The value to round. |
size | The result should be a multiple of this size. |
Definition at line 178 of file utils.c.
M0_INTERNAL uint64_t round_up | ( | uint64_t | val, |
uint64_t | size | ||
) |
Rounds val up to the nearest multiple of size. This is heavily based on m0t1fs/linux_kernel/file.cround_up
val | The value to round. |
size | The result should be a multiple of this size. |
Definition at line 192 of file utils.c.
M0_INTERNAL uint32_t rows_nr | ( | struct m0_pdclust_layout * | play, |
struct m0_obj * | obj | ||
) |
Determines the size of data/parity unit in pages. This is essentially the rows number in the pargrp_iomap::pi_databufs[row][col] 2-dimentional array, hence the name.
play | The Parity layout. |
obj | The object. |
Definition at line 87 of file utils.c.
M0_INTERNAL m0_bcount_t seg_endpos | ( | const struct m0_indexvec * | ivec, |
uint32_t | i | ||
) |
M0_INTERNAL uint64_t target_offset | ( | uint64_t | frame, |
struct m0_pdclust_layout * | play, | ||
m0_bindex_t | gob_offset | ||
) |
Calculates the offset in the target object based on the global offset.
frame | Frame number of target object. |
play | The Parity layout for the global object |
gob_offset | Offset in global object. |
Definition at line 129 of file utils.c.