Motr  M0
file.c File Reference
#include <linux/version.h>
#include <asm/uaccess.h>
#include <asm/atomic.h>
#include <linux/mm.h>
#include <linux/fs.h>
#include <linux/mount.h>
#include <linux/uio.h>
#include <linux/aio.h>
#include "lib/trace.h"
#include "fop/fom_generic.h"
#include "lib/memory.h"
#include "lib/misc.h"
#include "lib/bob.h"
#include "lib/ext.h"
#include "lib/arith.h"
#include "lib/finject.h"
#include "layout/pdclust.h"
#include "lib/tlist.h"
#include "rpc/rpc_machine.h"
#include "ioservice/io_fops.h"
#include "motr/magic.h"
#include "m0t1fs/linux_kernel/m0t1fs.h"
#include "file/file.h"
#include "fd/fd.h"
#include "lib/hash.h"
#include "sns/parity_repair.h"
#include "addb2/addb2.h"
#include "m0t1fs/linux_kernel/file_internal.h"
#include "m0t1fs/linux_kernel/fsync.h"
#include "m0t1fs/linux_kernel/ioctl.h"
#include "ioservice/fid_convert.h"
Include dependency graph for file.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_M0T1FS
 
#define INDEX(ivec, i)   ((ivec)->iv_index[(i)])
 
#define COUNT(ivec, i)   ((ivec)->iv_vec.v_count[(i)])
 
#define SEG_NR(ivec)   ((ivec)->iv_vec.v_nr)
 
#define V_INDEX(ivec, i)   (*(m0_bindex_t*)(m0_varr_ele_get(&(ivec)->iv_index, (i))))
 
#define V_ADDR(bv, i)   (*(void**) (m0_varr_ele_get(&(bv )->iv_index, (i))))
 
#define V_COUNT(ivec, i)   (*(m0_bcount_t*)(m0_varr_ele_get(&(ivec)->iv_count, (i))))
 
#define V_SEG_NR(ivec)   ((ivec)->iv_nr)
 
#define PA(pa, i)   (*(enum page_attr*)(m0_varr_ele_get((pa), (i))))
 
#define indexvec_dump(ivec)
 
#define indexvec_varr_dump(ivec)
 

Functions

M0_INTERNAL void iov_iter_advance (struct iov_iter *i, size_t bytes)
 
M0_INTERNAL bool m0t1fs_inode_bob_check (struct m0t1fs_inode *bob)
 
 M0_TL_DECLARE (rpcbulk, M0_INTERNAL, struct m0_rpc_bulk_buf)
 
 M0_TL_DESCR_DECLARE (rpcbulk, M0_EXTERN)
 
 M0_TL_DESCR_DEFINE (iofops, "List of IO fops", static, struct io_req_fop, irf_link, irf_magic, M0_T1FS_IOFOP_MAGIC, M0_T1FS_TIOREQ_MAGIC)
 
 M0_TL_DEFINE (iofops, static, struct io_req_fop)
 
 M0_BOB_DEFINE (static, &tioreq_bobtype, target_ioreq)
 
 M0_BOB_DEFINE (static, &iofop_bobtype, io_req_fop)
 
 M0_BOB_DEFINE (static, &pgiomap_bobtype, pargrp_iomap)
 
 M0_BOB_DEFINE (static, &ioreq_bobtype, io_request)
 
 M0_BOB_DEFINE (static, &nwxfer_bobtype, nw_xfer_request)
 
 M0_BOB_DEFINE (static, &dtbuf_bobtype, data_buf)
 
static m0_bcount_t seg_endpos (const struct m0_indexvec *ivec, uint32_t i)
 
static m0_bcount_t v_seg_endpos (struct m0_indexvec_varr *ivec, uint32_t i)
 
M0_INTERNAL struct inodem0t1fs_file_to_inode (const struct file *file)
 
M0_INTERNAL struct m0t1fs_inode * m0t1fs_file_to_m0inode (const struct file *file)
 
M0_INTERNAL struct m0_pool_versionm0t1fs_file_to_pver (const struct file *file)
 
M0_INTERNAL struct m0_poolmachm0t1fs_file_to_poolmach (const struct file *file)
 
M0_INTERNAL struct m0t1fs_inode * m0t1fs_inode_to_m0inode (const struct inode *inode)
 
static struct inodeiomap_to_inode (const struct pargrp_iomap *map)
 
M0_INTERNAL struct m0t1fs_sb * m0inode_to_sb (const struct m0t1fs_inode *m0inode)
 
static const struct m0_fidfile_to_fid (const struct file *file)
 
static struct m0t1fs_sb * file_to_sb (const struct file *file)
 
static struct m0_sm_groupfile_to_smgroup (const struct file *file)
 
static uint64_t page_nr (m0_bcount_t size)
 
static struct m0_layout_instancelayout_instance (const struct io_request *req)
 
static struct m0_pdclust_instancepdlayout_instance (const struct m0_layout_instance *li)
 
static struct m0_pdclust_layoutpdlayout_get (const struct io_request *req)
 
static uint32_t layout_n (const struct m0_pdclust_layout *play)
 
static uint32_t layout_k (const struct m0_pdclust_layout *play)
 
static uint64_t layout_unit_size (const struct m0_pdclust_layout *play)
 
static uint64_t parity_units_page_nr (const struct m0_pdclust_layout *play)
 
static uint64_t indexvec_varr_count (struct m0_indexvec_varr *varr)
 
static uint64_t iomap_page_nr (struct pargrp_iomap *map)
 
static uint64_t data_size (const struct m0_pdclust_layout *play)
 
static struct m0_parity_mathparity_math (struct io_request *req)
 
static uint64_t group_id (m0_bindex_t index, m0_bcount_t dtsize)
 
static bool is_page_read (struct data_buf *dbuf)
 
static uint64_t target_offset (uint64_t frame, struct m0_pdclust_layout *play, m0_bindex_t gob_offset)
 
static uint32_t target_ioreq_type_get (struct target_ioreq *ti)
 
static void target_ioreq_type_set (struct target_ioreq *ti, enum target_ioreq_type type)
 
static bool is_pver_dud (uint32_t fdev_nr, uint32_t dev_k, uint32_t fsvc_nr, uint32_t svc_k)
 
static uint64_t tioreqs_hash_func (const struct m0_htable *htable, const void *k)
 
static bool tioreq_key_eq (const void *key1, const void *key2)
 
 M0_HT_DESCR_DEFINE (tioreqht, "Hash of target_ioreq objects", static, struct target_ioreq, ti_link, ti_magic, M0_T1FS_TIOREQ_MAGIC, M0_T1FS_TLIST_HEAD_MAGIC, ti_fid.f_container, tioreqs_hash_func, tioreq_key_eq)
 
 M0_HT_DEFINE (tioreqht, static, struct target_ioreq, uint64_t)
 
static void pargrp_src_addr (m0_bindex_t index, const struct io_request *req, const struct target_ioreq *tio_req, struct m0_pdclust_src_addr *src)
 
static uint64_t pargrp_id_find (m0_bindex_t index, const struct io_request *req, const struct io_req_fop *ir_fop)
 
static m0_bindex_t gfile_offset (m0_bindex_t toff, const struct pargrp_iomap *map, const struct m0_pdclust_layout *play, const struct m0_pdclust_src_addr *src)
 
static struct m0_fid target_fid (const struct io_request *req, struct m0_pdclust_tgt_addr *tgt)
 
static struct m0_rpc_sessiontarget_session (struct io_request *req, struct m0_fid tfid)
 
static uint64_t page_id (m0_bindex_t offset)
 
static uint32_t rows_nr (struct m0_pdclust_layout *play)
 
static uint64_t round_down (uint64_t val, uint64_t size)
 
static uint64_t round_up (uint64_t val, uint64_t size)
 
static void page_pos_get (struct pargrp_iomap *map, m0_bindex_t index, uint32_t *row, uint32_t *col)
 
static void parity_page_pos_get (struct pargrp_iomap *map, m0_bindex_t index, uint32_t *row, uint32_t *col)
 
static m0_bindex_t data_page_offset_get (struct pargrp_iomap *map, uint32_t row, uint32_t col)
 
M0_INTERNAL void io_bob_tlists_init (void)
 
static void device_state_reset (struct nw_xfer_request *xfer, bool rmw)
 
static void io_rpc_item_cb (struct m0_rpc_item *item)
 
static void io_req_fop_release (struct m0_ref *ref)
 
static void cc_rpc_item_cb (struct m0_rpc_item *item)
 
static void cc_fop_release (struct m0_ref *ref)
 
static bool nw_xfer_request_invariant (const struct nw_xfer_request *xfer)
 
static int nw_xfer_io_distribute (struct nw_xfer_request *xfer)
 
static void nw_xfer_req_complete (struct nw_xfer_request *xfer, bool rmw)
 
static int nw_xfer_req_dispatch (struct nw_xfer_request *xfer)
 
static int nw_xfer_tioreq_map (struct nw_xfer_request *xfer, const struct m0_pdclust_src_addr *src, struct m0_pdclust_tgt_addr *tgt, struct target_ioreq **tio)
 
static int nw_xfer_tioreq_get (struct nw_xfer_request *xfer, const struct m0_fid *fid, uint64_t ta_obj, struct m0_rpc_session *session, uint64_t size, struct target_ioreq **out)
 
static int pargrp_iomap_populate (struct pargrp_iomap *map, struct m0_ivec_varr_cursor *cursor)
 
static bool pargrp_iomap_spans_seg (struct pargrp_iomap *map, m0_bindex_t index, m0_bcount_t count)
 
static int pargrp_iomap_readrest (struct pargrp_iomap *map)
 
static int pargrp_iomap_seg_process (struct pargrp_iomap *map, uint64_t seg, bool rmw)
 
static int pargrp_iomap_parity_recalc (struct pargrp_iomap *map)
 
static int pargrp_iomap_parity_verify (struct pargrp_iomap *map)
 
static uint64_t pargrp_iomap_fullpages_count (struct pargrp_iomap *map)
 
static int pargrp_iomap_readold_auxbuf_alloc (struct pargrp_iomap *map)
 
static int pargrp_iomap_paritybufs_alloc (struct pargrp_iomap *map)
 
static int pargrp_iomap_dgmode_process (struct pargrp_iomap *map, struct target_ioreq *tio, m0_bindex_t *index, uint32_t count)
 
static int pargrp_iomap_dgmode_postprocess (struct pargrp_iomap *map)
 
static int pargrp_iomap_dgmode_recover (struct pargrp_iomap *map)
 
static bool pargrp_iomap_invariant_nr (struct io_request *req)
 
static bool target_ioreq_invariant (struct target_ioreq *ti)
 
static void target_ioreq_fini (struct target_ioreq *ti)
 
static int target_ioreq_iofops_prepare (struct target_ioreq *ti, enum page_attr filter)
 
static void target_ioreq_seg_add (struct target_ioreq *ti, const struct m0_pdclust_src_addr *src, const struct m0_pdclust_tgt_addr *tgt, m0_bindex_t gob_offset, m0_bcount_t count, struct pargrp_iomap *map)
 
static int target_cob_create_fop_prepare (struct target_ioreq *ti)
 
static int io_req_fop_dgmode_read (struct io_req_fop *irfop)
 
static struct data_bufdata_buf_alloc_init (enum page_attr pattr)
 
static void data_buf_dealloc_fini (struct data_buf *buf)
 
static void io_bottom_half (struct m0_sm_group *grp, struct m0_sm_ast *ast)
 
static void cc_bottom_half (struct m0_sm_group *grp, struct m0_sm_ast *ast)
 
static int ioreq_iomaps_prepare (struct io_request *req)
 
static void ioreq_iomaps_destroy (struct io_request *req)
 
static int ioreq_user_data_copy (struct io_request *req, enum copy_direction dir, enum page_attr filter)
 
static int ioreq_parity_recalc (struct io_request *req)
 
static int ioreq_parity_verify (struct io_request *req)
 
static int ioreq_iosm_handle (struct io_request *req)
 
static int ioreq_file_lock (struct io_request *req)
 
static void ioreq_file_unlock (struct io_request *req)
 
static int ioreq_no_lock (struct io_request *req)
 
static void ioreq_no_unlock (struct io_request *req)
 
static int ioreq_dgmode_read (struct io_request *req, bool rmw)
 
static int ioreq_dgmode_write (struct io_request *req, bool rmw)
 
static int ioreq_dgmode_recover (struct io_request *req)
 
static bool should_req_sm_complete (struct io_request *req)
 
static uint32_t ioreq_sm_state (const struct io_request *req)
 
static void ioreq_sm_failed (struct io_request *req, int rc)
 
static void ioreq_sm_state_set (struct io_request *req, int state)
 
static void ioreq_sm_state_set_nolock (struct io_request *req, int state)
 
static bool io_request_invariant (struct io_request *req)
 
static bool data_buf_invariant (const struct data_buf *db)
 
static bool data_buf_invariant_nr (const struct pargrp_iomap *map)
 
static void data_buf_init (struct data_buf *buf, void *addr, uint64_t flags)
 
static void data_buf_fini (struct data_buf *buf)
 
static bool io_req_fop_invariant (const struct io_req_fop *fop)
 
static bool pargrp_iomap_invariant (struct pargrp_iomap *map)
 
static void nw_xfer_request_init (struct nw_xfer_request *xfer)
 
static void nw_xfer_request_fini (struct nw_xfer_request *xfer)
 
M0_INTERNAL int user_page_map (struct data_buf *dbuf, unsigned long user_addr)
 
static void user_page_unmap (struct data_buf *dbuf, bool set_dirty)
 
static int user_data_copy (struct pargrp_iomap *map, m0_bindex_t start, m0_bindex_t end, struct iov_iter *it, enum copy_direction dir, enum page_attr filter)
 
static void ioreq_pgiomap_find (struct io_request *req, uint64_t grpid, uint64_t *cursor, struct pargrp_iomap **out)
 
static void indexvec_sort (struct m0_indexvec_varr *ivec)
 
static int pargrp_iomap_init (struct pargrp_iomap *map, struct io_request *req, uint64_t grpid)
 
static void pargrp_iomap_fini (struct pargrp_iomap *map)
 
static int pargrp_iomap_databuf_alloc (struct pargrp_iomap *map, uint32_t row, uint32_t col)
 
static uint64_t pargrp_iomap_auxbuf_alloc (struct pargrp_iomap *map, uint32_t row, uint32_t col)
 
static m0_bindex_t seg_set (struct pargrp_iomap *map, uint32_t seg, struct m0_ivec_varr_cursor *cur, m0_bindex_t grpend)
 
static void seg_idx_inc_round (struct pargrp_iomap *map, uint32_t seg, uint64_t sz)
 
static void seg_align (struct pargrp_iomap *map, uint32_t seg, m0_bindex_t end, uint64_t sz)
 
static int pargrp_iomap_populate_pi_ivec (struct pargrp_iomap *map, struct m0_ivec_varr_cursor *cursor, bool rmw)
 
static int pargrp_iomap_select_ro_rr (struct pargrp_iomap *map, m0_bcount_t data_pages_nr, m0_bcount_t parity_pages_nr)
 
static int pargrp_iomap_pages_mark_as_failed (struct pargrp_iomap *map, enum m0_pdclust_unit_type type)
 
static int unit_state (const struct m0_pdclust_src_addr *src, const struct io_request *req, enum m0_pool_nd_state *state)
 
static int io_spare_map (const struct pargrp_iomap *map, const struct m0_pdclust_src_addr *src, uint32_t *spare_slot, uint32_t *spare_slot_prev, enum m0_pool_nd_state *eff_state)
 
static void mark_page_as_read_failed (struct pargrp_iomap *map, uint32_t row, uint32_t col, enum page_attr page_type)
 
static uint32_t iomap_dgmode_recov_prepare (struct pargrp_iomap *map, uint8_t *failed)
 
static int ioreq_iomaps_parity_groups_cal (struct io_request *req)
 
static int dgmode_rwvec_alloc_init (struct target_ioreq *ti)
 
static void dgmode_rwvec_dealloc_fini (struct dgmode_rwvec *dg)
 
static void databufs_set_dgw_mode (struct pargrp_iomap *iomap, struct m0_ext *ext)
 
static void paritybufs_set_dgw_mode (struct pargrp_iomap *iomap, struct m0_pdclust_layout *play, uint64_t unit)
 
static int ioreq_sm_timedwait (struct io_request *req, uint64_t state)
 
static uint64_t tolerance_of_level (struct io_request *req, uint64_t lv)
 
static bool is_session_marked (struct io_request *req, struct m0_rpc_session *session)
 
static int device_check (struct io_request *req)
 
static int io_request_init (struct io_request *req, struct file *file, const struct iovec *iov, struct m0_indexvec_varr *ivv, enum io_req_type rw)
 
static void io_request_fini (struct io_request *req)
 
static bool should_spare_be_mapped (struct io_request *req, enum m0_pool_nd_state dev_state)
 
static int target_ioreq_init (struct target_ioreq *ti, struct nw_xfer_request *xfer, const struct m0_fid *cobfid, uint64_t ta_obj, struct m0_rpc_session *session, uint64_t size)
 
static struct target_ioreqtarget_ioreq_locate (struct nw_xfer_request *xfer, const struct m0_fid *fid)
 
static void buf_page_free (struct m0_buf *buf)
 
static int io_req_fop_init (struct io_req_fop *fop, struct target_ioreq *ti, enum page_attr pattr)
 
static void io_req_fop_fini (struct io_req_fop *fop)
 
static void irfop_fini (struct io_req_fop *irfop)
 
static void ioreq_failed_fini (struct io_request *req, int rc)
 
M0_INTERNAL ssize_t m0t1fs_aio (struct kiocb *kcb, const struct iovec *iov, struct m0_indexvec_varr *ivv, enum io_req_type rw)
 
static struct m0_indexvec_varrindexvec_create (unsigned long seg_nr, const struct iovec *iov, loff_t pos)
 
static ssize_t file_dio_write (struct kiocb *kcb, struct iov_iter *from)
 
static ssize_t aio_write (struct kiocb *kcb, struct iov_iter *from)
 
static ssize_t file_aio_write (struct kiocb *kcb, struct iov_iter *from)
 
static ssize_t aio_read (struct kiocb *kcb, struct iov_iter *from)
 
static ssize_t file_aio_read (struct kiocb *kcb, struct iov_iter *from)
 
int m0t1fs_flush (struct file *file, fl_owner_t id)
 
static void client_passive_recv (const struct m0_net_buffer_event *evt)
 
static int iofop_async_submit (struct m0_io_fop *iofop, struct m0_rpc_session *session)
 
M0_INTERNAL struct m0_filem0_fop_to_file (struct m0_fop *fop)
 
M0_INTERNAL struct m0t1fs_sb * m0_fop_to_sb (struct m0_fop *fop)
 
static uint32_t io_desc_size (struct m0_net_domain *ndom)
 
static uint32_t io_seg_size (void)
 
static uint32_t io_di_size (const struct io_request *req)
 
static int bulk_buffer_add (struct io_req_fop *irfop, struct m0_net_domain *dom, struct m0_rpc_bulk_buf **rbuf, uint32_t *delta, uint32_t maxsize)
 
static ssize_t m0t1fs_direct_IO (struct kiocb *kcb, struct iov_iter *from)
 

Variables

struct io_mem_stats iommstats
 
static const struct m0_bob_type tioreq_bobtype
 
static struct m0_bob_type iofop_bobtype
 
static const struct m0_bob_type ioreq_bobtype
 
static const struct m0_bob_type pgiomap_bobtype
 
static const struct m0_bob_type nwxfer_bobtype
 
static const struct m0_bob_type dtbuf_bobtype
 
static const struct m0_rpc_item_ops io_item_ops
 
static const struct m0_rpc_item_ops cc_item_ops
 
static const struct nw_xfer_ops xfer_ops
 
static const struct pargrp_iomap_ops iomap_ops
 
static const struct target_ioreq_ops tioreq_ops
 
static const struct io_request_ops ioreq_ops
 
static const struct io_request_ops ioreq_oostore_ops
 
static struct m0_sm_state_descr io_states []
 
static const struct m0_sm_conf io_sm_conf
 
const struct m0_uint128 m0_rm_m0t1fs_group
 
const struct file_operations m0t1fs_reg_file_operations
 
const struct m0_net_buffer_callbacks client_buf_bulk_cb
 
const struct inode_operations m0t1fs_reg_inode_operations
 
const struct address_space_operations m0t1fs_aops
 

Macro Definition Documentation

◆ COUNT

#define COUNT (   ivec,
  i 
)    ((ivec)->iv_vec.v_count[(i)])

Definition at line 392 of file file.c.

◆ INDEX

#define INDEX (   ivec,
  i 
)    ((ivec)->iv_index[(i)])

Definition at line 391 of file file.c.

◆ indexvec_dump

#define indexvec_dump (   ivec)
Value:
do { \
int seg; \
for (seg = 0; seg < SEG_NR((ivec)); ++seg) { \
M0_LOG(M0_DEBUG, "seg# %d: [pos, +len) = [%llu, +%llu)", \
seg, INDEX((ivec), seg), COUNT((ivec), seg)); \
} \
} while (0)
#define COUNT(ivec, i)
Definition: file.c:392
#define SEG_NR(ivec)
Definition: file.c:393
#define INDEX(ivec, i)
Definition: file.c:391
static struct m0_be_seg * seg
Definition: btree.c:40

Definition at line 402 of file file.c.

◆ indexvec_varr_dump

#define indexvec_varr_dump (   ivec)
Value:
do { \
int seg; \
for (seg = 0; seg < V_SEG_NR((ivec)); ++seg) { \
M0_LOG(M0_DEBUG, "seg# %d: [pos, +len) = [%llu, +%llu)", \
seg, V_INDEX((ivec), seg), V_COUNT((ivec), seg)); \
} \
} while (0)
#define V_INDEX(ivec, i)
Definition: file.c:395
#define V_COUNT(ivec, i)
Definition: file.c:397
static struct m0_be_seg * seg
Definition: btree.c:40
#define V_SEG_NR(ivec)
Definition: file.c:398

Definition at line 411 of file file.c.

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_M0T1FS

Definition at line 36 of file file.c.

◆ PA

#define PA (   pa,
  i 
)    (*(enum page_attr*)(m0_varr_ele_get((pa), (i))))

Definition at line 400 of file file.c.

◆ SEG_NR

#define SEG_NR (   ivec)    ((ivec)->iv_vec.v_nr)

Definition at line 393 of file file.c.

◆ V_ADDR

#define V_ADDR (   bv,
  i 
)    (*(void**) (m0_varr_ele_get(&(bv )->iv_index, (i))))

Definition at line 396 of file file.c.

◆ V_COUNT

#define V_COUNT (   ivec,
  i 
)    (*(m0_bcount_t*)(m0_varr_ele_get(&(ivec)->iv_count, (i))))

Definition at line 397 of file file.c.

◆ V_INDEX

#define V_INDEX (   ivec,
  i 
)    (*(m0_bindex_t*)(m0_varr_ele_get(&(ivec)->iv_index, (i))))

Definition at line 395 of file file.c.

◆ V_SEG_NR

#define V_SEG_NR (   ivec)    ((ivec)->iv_nr)

Definition at line 398 of file file.c.

Function Documentation

◆ aio_read()

static ssize_t aio_read ( struct kiocb *  kcb,
struct iov_iter *  from 
)
static

Definition at line 5375 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ aio_write()

static ssize_t aio_write ( struct kiocb *  kcb,
struct iov_iter *  from 
)
static

Definition at line 5234 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ buf_page_free()

static void buf_page_free ( struct m0_buf buf)
static

Definition at line 4828 of file file.c.

Here is the caller graph for this function:

◆ bulk_buffer_add()

static int bulk_buffer_add ( struct io_req_fop irfop,
struct m0_net_domain dom,
struct m0_rpc_bulk_buf **  rbuf,
uint32_t *  delta,
uint32_t  maxsize 
)
static

Definition at line 6464 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cc_bottom_half()

static void cc_bottom_half ( struct m0_sm_group grp,
struct m0_sm_ast ast 
)
static

Definition at line 5876 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cc_fop_release()

static void cc_fop_release ( struct m0_ref ref)
static

Definition at line 6514 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cc_rpc_item_cb()

static void cc_rpc_item_cb ( struct m0_rpc_item item)
static

Definition at line 5851 of file file.c.

Here is the call graph for this function:

◆ client_passive_recv()

static void client_passive_recv ( const struct m0_net_buffer_event evt)
static

Definition at line 5622 of file file.c.

Here is the call graph for this function:

◆ data_buf_alloc_init()

static struct data_buf * data_buf_alloc_init ( enum page_attr  pattr)
static

Definition at line 4801 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ data_buf_dealloc_fini()

static void data_buf_dealloc_fini ( struct data_buf buf)
static

Definition at line 4838 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ data_buf_fini()

static void data_buf_fini ( struct data_buf buf)
static

Definition at line 1157 of file file.c.

Here is the caller graph for this function:

◆ data_buf_init()

static void data_buf_init ( struct data_buf buf,
void *  addr,
uint64_t  flags 
)
static

Definition at line 1146 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ data_buf_invariant()

static bool data_buf_invariant ( const struct data_buf db)
static

Definition at line 1110 of file file.c.

Here is the caller graph for this function:

◆ data_buf_invariant_nr()

static bool data_buf_invariant_nr ( const struct pargrp_iomap map)
static

Definition at line 1118 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ data_page_offset_get()

static m0_bindex_t data_page_offset_get ( struct pargrp_iomap map,
uint32_t  row,
uint32_t  col 
)
static

Definition at line 767 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ data_size()

static uint64_t data_size ( const struct m0_pdclust_layout play)
inlinestatic

Definition at line 550 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ databufs_set_dgw_mode()

static void databufs_set_dgw_mode ( struct pargrp_iomap iomap,
struct m0_ext ext 
)
static

Sets databufs within a data unit to the degraded write mode. The unit boundary is ensured by the calling code at nw_xfer_io_distribute().

Definition at line 3351 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ device_check()

static int device_check ( struct io_request req)
static

Returns number of failed devices or -EIO if number of failed devices exceeds the value of K (number of spare devices in parity group). Once MOTR-899 lands into dev the code for this function will change. In that case it will only check if a given pool is dud.

Definition at line 3641 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ device_state_reset()

static void device_state_reset ( struct nw_xfer_request xfer,
bool  rmw 
)
static

Definition at line 4006 of file file.c.

Here is the caller graph for this function:

◆ dgmode_rwvec_alloc_init()

static int dgmode_rwvec_alloc_init ( struct target_ioreq ti)
static

Definition at line 3275 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dgmode_rwvec_dealloc_fini()

static void dgmode_rwvec_dealloc_fini ( struct dgmode_rwvec dg)
static

Definition at line 3335 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_aio_read()

static ssize_t file_aio_read ( struct kiocb *  kcb,
struct iov_iter *  from 
)
static

Definition at line 5544 of file file.c.

Here is the call graph for this function:

◆ file_aio_write()

static ssize_t file_aio_write ( struct kiocb *  kcb,
struct iov_iter *  from 
)
static

Definition at line 5348 of file file.c.

Here is the call graph for this function:

◆ file_dio_write()

static ssize_t file_dio_write ( struct kiocb *  kcb,
struct iov_iter *  from 
)
static

Definition at line 5187 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_to_fid()

static const struct m0_fid* file_to_fid ( const struct file file)
inlinestatic

Definition at line 477 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_to_sb()

static struct m0t1fs_sb* file_to_sb ( const struct file file)
inlinestatic

Definition at line 482 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_to_smgroup()

static struct m0_sm_group* file_to_smgroup ( const struct file file)
inlinestatic

Definition at line 487 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gfile_offset()

static m0_bindex_t gfile_offset ( m0_bindex_t  toff,
const struct pargrp_iomap map,
const struct m0_pdclust_layout play,
const struct m0_pdclust_src_addr src 
)
inlinestatic

Definition at line 648 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ group_id()

static uint64_t group_id ( m0_bindex_t  index,
m0_bcount_t  dtsize 
)
inlinestatic

Definition at line 560 of file file.c.

Here is the caller graph for this function:

◆ indexvec_create()

static struct m0_indexvec_varr* indexvec_create ( unsigned long  seg_nr,
const struct iovec *  iov,
loff_t  pos 
)
static

Definition at line 5145 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ indexvec_sort()

static void indexvec_sort ( struct m0_indexvec_varr ivec)
static

Definition at line 1768 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ indexvec_varr_count()

static uint64_t indexvec_varr_count ( struct m0_indexvec_varr varr)
inlinestatic

Definition at line 535 of file file.c.

Here is the caller graph for this function:

◆ io_bob_tlists_init()

M0_INTERNAL void io_bob_tlists_init ( void  )

Definition at line 790 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ io_bottom_half()

static void io_bottom_half ( struct m0_sm_group grp,
struct m0_sm_ast ast 
)
static

Definition at line 6025 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ io_desc_size()

static uint32_t io_desc_size ( struct m0_net_domain ndom)
inlinestatic

Definition at line 6439 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ io_di_size()

static uint32_t io_di_size ( const struct io_request req)
static

Definition at line 6454 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ io_req_fop_dgmode_read()

static int io_req_fop_dgmode_read ( struct io_req_fop irfop)
static

Degraded mode read support for IO request fop. Invokes degraded mode read support routines for upper data structures like pargrp_iomap.

Definition at line 6374 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ io_req_fop_fini()

static void io_req_fop_fini ( struct io_req_fop fop)
static

Definition at line 5019 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ io_req_fop_init()

static int io_req_fop_init ( struct io_req_fop fop,
struct target_ioreq ti,
enum page_attr  pattr 
)
static

Definition at line 4971 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ io_req_fop_invariant()

static bool io_req_fop_invariant ( const struct io_req_fop fop)
static

Definition at line 1165 of file file.c.

Here is the caller graph for this function:

◆ io_req_fop_release()

static void io_req_fop_release ( struct m0_ref ref)
static

Definition at line 5747 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ io_request_fini()

static void io_request_fini ( struct io_request req)
static

Definition at line 4404 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ io_request_init()

static int io_request_init ( struct io_request req,
struct file file,
const struct iovec *  iov,
struct m0_indexvec_varr ivv,
enum io_req_type  rw 
)
static

Definition at line 4299 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ io_request_invariant()

static bool io_request_invariant ( struct io_request req)
static

Definition at line 1057 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ io_rpc_item_cb()

static void io_rpc_item_cb ( struct m0_rpc_item item)
static

Definition at line 5954 of file file.c.

Here is the call graph for this function:

◆ io_seg_size()

static uint32_t io_seg_size ( void  )
inlinestatic

Definition at line 6449 of file file.c.

Here is the caller graph for this function:

◆ io_spare_map()

static int io_spare_map ( const struct pargrp_iomap map,
const struct m0_pdclust_src_addr src,
uint32_t *  spare_slot,
uint32_t *  spare_slot_prev,
enum m0_pool_nd_state eff_state 
)
static

Definition at line 2667 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ iofop_async_submit()

static int iofop_async_submit ( struct m0_io_fop iofop,
struct m0_rpc_session session 
)
static

Definition at line 5697 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ iomap_dgmode_recov_prepare()

static uint32_t iomap_dgmode_recov_prepare ( struct pargrp_iomap map,
uint8_t *  failed 
)
static

Definition at line 3012 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ iomap_page_nr()

static uint64_t iomap_page_nr ( struct pargrp_iomap map)
inlinestatic

Definition at line 545 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ iomap_to_inode()

static struct inode* iomap_to_inode ( const struct pargrp_iomap map)
inlinestatic

Definition at line 467 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ioreq_dgmode_read()

static int ioreq_dgmode_read ( struct io_request req,
bool  rmw 
)
static

Definition at line 3807 of file file.c.

Here is the call graph for this function:

◆ ioreq_dgmode_recover()

static int ioreq_dgmode_recover ( struct io_request req)
static

Definition at line 3570 of file file.c.

Here is the call graph for this function:

◆ ioreq_dgmode_write()

static int ioreq_dgmode_write ( struct io_request req,
bool  rmw 
)
static

Definition at line 3711 of file file.c.

Here is the call graph for this function:

◆ ioreq_failed_fini()

static void ioreq_failed_fini ( struct io_request req,
int  rc 
)
static

Definition at line 5058 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ioreq_file_lock()

static int ioreq_file_lock ( struct io_request req)
static

Definition at line 3970 of file file.c.

Here is the call graph for this function:

◆ ioreq_file_unlock()

static void ioreq_file_unlock ( struct io_request req)
static

Definition at line 3991 of file file.c.

Here is the call graph for this function:

◆ ioreq_iomaps_destroy()

static void ioreq_iomaps_destroy ( struct io_request req)
static

Definition at line 3255 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ioreq_iomaps_parity_groups_cal()

static int ioreq_iomaps_parity_groups_cal ( struct io_request req)
static

Definition at line 3130 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ioreq_iomaps_prepare()

static int ioreq_iomaps_prepare ( struct io_request req)
static

Definition at line 3187 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ioreq_iosm_handle()

static int ioreq_iosm_handle ( struct io_request req)
static

Definition at line 4018 of file file.c.

Here is the call graph for this function:

◆ ioreq_no_lock()

static int ioreq_no_lock ( struct io_request req)
static

Definition at line 3998 of file file.c.

◆ ioreq_no_unlock()

static void ioreq_no_unlock ( struct io_request req)
static

Definition at line 4003 of file file.c.

◆ ioreq_parity_recalc()

static int ioreq_parity_recalc ( struct io_request req)
static

Definition at line 1649 of file file.c.

Here is the call graph for this function:

◆ ioreq_parity_verify()

static int ioreq_parity_verify ( struct io_request req)
static

Definition at line 1611 of file file.c.

Here is the call graph for this function:

◆ ioreq_pgiomap_find()

static void ioreq_pgiomap_find ( struct io_request req,
uint64_t  grpid,
uint64_t *  cursor,
struct pargrp_iomap **  out 
)
static

Definition at line 1675 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ioreq_sm_failed()

static void ioreq_sm_failed ( struct io_request req,
int  rc 
)
static

Definition at line 1031 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ioreq_sm_state()

static uint32_t ioreq_sm_state ( const struct io_request req)
inlinestatic

Definition at line 975 of file file.c.

Here is the caller graph for this function:

◆ ioreq_sm_state_set()

static void ioreq_sm_state_set ( struct io_request req,
int  state 
)
static

Definition at line 1039 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ioreq_sm_state_set_nolock()

static void ioreq_sm_state_set_nolock ( struct io_request req,
int  state 
)
static

Definition at line 1049 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ioreq_sm_timedwait()

static int ioreq_sm_timedwait ( struct io_request req,
uint64_t  state 
)
inlinestatic

Definition at line 3546 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ioreq_user_data_copy()

static int ioreq_user_data_copy ( struct io_request req,
enum copy_direction  dir,
enum page_attr  filter 
)
static

Definition at line 1700 of file file.c.

Here is the call graph for this function:

◆ iov_iter_advance()

M0_INTERNAL void iov_iter_advance ( struct iov_iter *  i,
size_t  bytes 
)
Here is the caller graph for this function:

◆ irfop_fini()

static void irfop_fini ( struct io_req_fop irfop)
static

Definition at line 5044 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_page_read()

static bool is_page_read ( struct data_buf dbuf)
inlinestatic

Definition at line 565 of file file.c.

Here is the caller graph for this function:

◆ is_pver_dud()

static bool is_pver_dud ( uint32_t  fdev_nr,
uint32_t  dev_k,
uint32_t  fsvc_nr,
uint32_t  svc_k 
)
static

Definition at line 3699 of file file.c.

Here is the caller graph for this function:

◆ is_session_marked()

static bool is_session_marked ( struct io_request req,
struct m0_rpc_session session 
)
static
Todo:
This code is not required once MOTR-899 lands into dev. Returns true if a given session is already marked as failed. In case a session is not already marked for failure, the functions marks it and returns false.

Definition at line 3615 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ layout_instance()

static struct m0_layout_instance* layout_instance ( const struct io_request req)
static

Definition at line 498 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ layout_k()

static uint32_t layout_k ( const struct m0_pdclust_layout play)
inlinestatic

Definition at line 520 of file file.c.

Here is the caller graph for this function:

◆ layout_n()

static uint32_t layout_n ( const struct m0_pdclust_layout play)
inlinestatic

Definition at line 515 of file file.c.

Here is the caller graph for this function:

◆ layout_unit_size()

static uint64_t layout_unit_size ( const struct m0_pdclust_layout play)
inlinestatic

Definition at line 525 of file file.c.

Here is the caller graph for this function:

◆ M0_BOB_DEFINE() [1/6]

M0_BOB_DEFINE ( static  ,
tioreq_bobtype,
target_ioreq   
)

◆ M0_BOB_DEFINE() [2/6]

M0_BOB_DEFINE ( static  ,
iofop_bobtype,
io_req_fop   
)

◆ M0_BOB_DEFINE() [3/6]

M0_BOB_DEFINE ( static  ,
pgiomap_bobtype,
pargrp_iomap   
)

◆ M0_BOB_DEFINE() [4/6]

M0_BOB_DEFINE ( static  ,
ioreq_bobtype,
io_request   
)

◆ M0_BOB_DEFINE() [5/6]

M0_BOB_DEFINE ( static  ,
nwxfer_bobtype,
nw_xfer_request   
)

◆ M0_BOB_DEFINE() [6/6]

M0_BOB_DEFINE ( static  ,
dtbuf_bobtype,
data_buf   
)

◆ m0_fop_to_file()

M0_INTERNAL struct m0_file* m0_fop_to_file ( struct m0_fop fop)

Definition at line 5998 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_fop_to_sb()

M0_INTERNAL struct m0t1fs_sb* m0_fop_to_sb ( struct m0_fop fop)

Definition at line 6012 of file file.c.

Here is the call graph for this function:

◆ M0_HT_DEFINE()

M0_HT_DEFINE ( tioreqht  ,
static  ,
struct target_ioreq  ,
uint64_t   
)

◆ M0_HT_DESCR_DEFINE()

M0_HT_DESCR_DEFINE ( tioreqht  ,
"Hash of target_ioreq objects"  ,
static  ,
struct target_ioreq  ,
ti_link  ,
ti_magic  ,
M0_T1FS_TIOREQ_MAGIC  ,
M0_T1FS_TLIST_HEAD_MAGIC  ,
ti_fid.  f_container,
tioreqs_hash_func  ,
tioreq_key_eq   
)

◆ M0_TL_DECLARE()

M0_TL_DECLARE ( rpcbulk  ,
M0_INTERNAL  ,
struct m0_rpc_bulk_buf   
)

◆ M0_TL_DEFINE()

M0_TL_DEFINE ( iofops  ,
static  ,
struct io_req_fop   
)

◆ M0_TL_DESCR_DECLARE()

M0_TL_DESCR_DECLARE ( rpcbulk  ,
M0_EXTERN   
)

◆ M0_TL_DESCR_DEFINE()

M0_TL_DESCR_DEFINE ( iofops  ,
"List of IO fops"  ,
static  ,
struct io_req_fop  ,
irf_link  ,
irf_magic  ,
M0_T1FS_IOFOP_MAGIC  ,
M0_T1FS_TIOREQ_MAGIC   
)

◆ m0inode_to_sb()

M0_INTERNAL struct m0t1fs_sb* m0inode_to_sb ( const struct m0t1fs_inode *  m0inode)

Definition at line 472 of file file.c.

Here is the caller graph for this function:

◆ m0t1fs_aio()

M0_INTERNAL ssize_t m0t1fs_aio ( struct kiocb *  kcb,
const struct iovec *  iov,
struct m0_indexvec_varr ivv,
enum io_req_type  rw 
)

Definition at line 5072 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0t1fs_direct_IO()

static ssize_t m0t1fs_direct_IO ( struct kiocb *  kcb,
struct iov_iter *  from 
)
static

Definition at line 6784 of file file.c.

Here is the call graph for this function:

◆ m0t1fs_file_to_inode()

M0_INTERNAL struct inode* m0t1fs_file_to_inode ( const struct file file)

Definition at line 435 of file file.c.

Here is the caller graph for this function:

◆ m0t1fs_file_to_m0inode()

M0_INTERNAL struct m0t1fs_inode* m0t1fs_file_to_m0inode ( const struct file file)

Definition at line 444 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0t1fs_file_to_poolmach()

M0_INTERNAL struct m0_poolmach* m0t1fs_file_to_poolmach ( const struct file file)

Definition at line 457 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0t1fs_file_to_pver()

M0_INTERNAL struct m0_pool_version* m0t1fs_file_to_pver ( const struct file file)

Definition at line 449 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0t1fs_flush()

int m0t1fs_flush ( struct file file,
fl_owner_t  id 
)

Definition at line 5570 of file file.c.

Here is the call graph for this function:

◆ m0t1fs_inode_bob_check()

M0_INTERNAL bool m0t1fs_inode_bob_check ( struct m0t1fs_inode *  bob)

◆ m0t1fs_inode_to_m0inode()

M0_INTERNAL struct m0t1fs_inode* m0t1fs_inode_to_m0inode ( const struct inode inode)

Definition at line 462 of file file.c.

Here is the caller graph for this function:

◆ mark_page_as_read_failed()

static void mark_page_as_read_failed ( struct pargrp_iomap map,
uint32_t  row,
uint32_t  col,
enum page_attr  page_type 
)
static

Definition at line 2701 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nw_xfer_io_distribute()

static int nw_xfer_io_distribute ( struct nw_xfer_request xfer)
static

Definition at line 3394 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nw_xfer_req_complete()

static void nw_xfer_req_complete ( struct nw_xfer_request xfer,
bool  rmw 
)
static

Definition at line 6266 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nw_xfer_req_dispatch()

static int nw_xfer_req_dispatch ( struct nw_xfer_request xfer)
static

Definition at line 6155 of file file.c.

Here is the call graph for this function:

◆ nw_xfer_request_fini()

static void nw_xfer_request_fini ( struct nw_xfer_request xfer)
static

Definition at line 1234 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nw_xfer_request_init()

static void nw_xfer_request_init ( struct nw_xfer_request xfer)
static

Definition at line 1207 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nw_xfer_request_invariant()

static bool nw_xfer_request_invariant ( const struct nw_xfer_request xfer)
static

Definition at line 1090 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nw_xfer_tioreq_get()

static int nw_xfer_tioreq_get ( struct nw_xfer_request xfer,
const struct m0_fid fid,
uint64_t  ta_obj,
struct m0_rpc_session session,
uint64_t  size,
struct target_ioreq **  out 
)
static

Definition at line 4754 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nw_xfer_tioreq_map()

static int nw_xfer_tioreq_map ( struct nw_xfer_request xfer,
const struct m0_pdclust_src_addr src,
struct m0_pdclust_tgt_addr tgt,
struct target_ioreq **  tio 
)
static

Definition at line 4520 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ page_id()

static uint64_t page_id ( m0_bindex_t  offset)
inlinestatic

Definition at line 686 of file file.c.

Here is the caller graph for this function:

◆ page_nr()

static uint64_t page_nr ( m0_bcount_t  size)
inlinestatic

Definition at line 492 of file file.c.

Here is the caller graph for this function:

◆ page_pos_get()

static void page_pos_get ( struct pargrp_iomap map,
m0_bindex_t  index,
uint32_t *  row,
uint32_t *  col 
)
static

Definition at line 725 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pargrp_id_find()

static uint64_t pargrp_id_find ( m0_bindex_t  index,
const struct io_request req,
const struct io_req_fop ir_fop 
)
inlinestatic

Definition at line 638 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pargrp_iomap_auxbuf_alloc()

static uint64_t pargrp_iomap_auxbuf_alloc ( struct pargrp_iomap map,
uint32_t  row,
uint32_t  col 
)
static

Definition at line 2076 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pargrp_iomap_databuf_alloc()

static int pargrp_iomap_databuf_alloc ( struct pargrp_iomap map,
uint32_t  row,
uint32_t  col 
)
static

Definition at line 1951 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pargrp_iomap_dgmode_postprocess()

static int pargrp_iomap_dgmode_postprocess ( struct pargrp_iomap map)
static

Definition at line 2861 of file file.c.

Here is the call graph for this function:

◆ pargrp_iomap_dgmode_process()

static int pargrp_iomap_dgmode_process ( struct pargrp_iomap map,
struct target_ioreq tio,
m0_bindex_t index,
uint32_t  count 
)
static
Parameters
mapthe failed map.
tiothe failed target io request.
indextarget offset array.
countthe array length of the above array.

Definition at line 2759 of file file.c.

Here is the call graph for this function:

◆ pargrp_iomap_dgmode_recover()

static int pargrp_iomap_dgmode_recover ( struct pargrp_iomap map)
static

Definition at line 3040 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pargrp_iomap_fini()

static void pargrp_iomap_fini ( struct pargrp_iomap map)
static

Definition at line 1881 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pargrp_iomap_fullpages_count()

static uint64_t pargrp_iomap_fullpages_count ( struct pargrp_iomap map)
static

Definition at line 2051 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pargrp_iomap_init()

static int pargrp_iomap_init ( struct pargrp_iomap map,
struct io_request req,
uint64_t  grpid 
)
static

Definition at line 1795 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pargrp_iomap_invariant()

static bool pargrp_iomap_invariant ( struct pargrp_iomap map)
static

Definition at line 1185 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pargrp_iomap_invariant_nr()

static bool pargrp_iomap_invariant_nr ( struct io_request req)
static

Definition at line 1201 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pargrp_iomap_pages_mark_as_failed()

static int pargrp_iomap_pages_mark_as_failed ( struct pargrp_iomap map,
enum m0_pdclust_unit_type  type 
)
static

Mark all pages in

Parameters
map,withthe specified
type,asfailed.

Definition at line 2583 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pargrp_iomap_parity_recalc()

static int pargrp_iomap_parity_recalc ( struct pargrp_iomap map)
static

Definition at line 1502 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pargrp_iomap_parity_verify()

static int pargrp_iomap_parity_verify ( struct pargrp_iomap map)
static

Definition at line 1409 of file file.c.

Here is the call graph for this function:

◆ pargrp_iomap_paritybufs_alloc()

static int pargrp_iomap_paritybufs_alloc ( struct pargrp_iomap map)
static

Definition at line 2275 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pargrp_iomap_populate()

static int pargrp_iomap_populate ( struct pargrp_iomap map,
struct m0_ivec_varr_cursor cursor 
)
static

Definition at line 2506 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pargrp_iomap_populate_pi_ivec()

static int pargrp_iomap_populate_pi_ivec ( struct pargrp_iomap map,
struct m0_ivec_varr_cursor cursor,
bool  rmw 
)
static

Populate parity group pi_ivv from user ivec at cursor and allocate pi_databufs structures correspondingly.

Definition at line 2364 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pargrp_iomap_readold_auxbuf_alloc()

static int pargrp_iomap_readold_auxbuf_alloc ( struct pargrp_iomap map)
static

Definition at line 2099 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pargrp_iomap_readrest()

static int pargrp_iomap_readrest ( struct pargrp_iomap map)
static

Definition at line 2203 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pargrp_iomap_seg_process()

static int pargrp_iomap_seg_process ( struct pargrp_iomap map,
uint64_t  seg,
bool  rmw 
)
static

Definition at line 1965 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pargrp_iomap_select_ro_rr()

static int pargrp_iomap_select_ro_rr ( struct pargrp_iomap map,
m0_bcount_t  data_pages_nr,
m0_bcount_t  parity_pages_nr 
)
static

Definition at line 2471 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pargrp_iomap_spans_seg()

static bool pargrp_iomap_spans_seg ( struct pargrp_iomap map,
m0_bindex_t  index,
m0_bcount_t  count 
)
static

Check if this [, ] is covered by existing ivec in the .

Definition at line 1931 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pargrp_src_addr()

static void pargrp_src_addr ( m0_bindex_t  index,
const struct io_request req,
const struct target_ioreq tio_req,
struct m0_pdclust_src_addr src 
)
static

Definition at line 621 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parity_math()

static struct m0_parity_math* parity_math ( struct io_request req)
inlinestatic

Definition at line 555 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parity_page_pos_get()

static void parity_page_pos_get ( struct pargrp_iomap map,
m0_bindex_t  index,
uint32_t *  row,
uint32_t *  col 
)
static

Definition at line 744 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parity_units_page_nr()

static uint64_t parity_units_page_nr ( const struct m0_pdclust_layout play)
inlinestatic

Definition at line 530 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ paritybufs_set_dgw_mode()

static void paritybufs_set_dgw_mode ( struct pargrp_iomap iomap,
struct m0_pdclust_layout play,
uint64_t  unit 
)
static

Sets paritybufs for the parity to the degraded write mode.

Definition at line 3373 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pdlayout_get()

static struct m0_pdclust_layout* pdlayout_get ( const struct io_request req)
inlinestatic

Definition at line 510 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pdlayout_instance()

static struct m0_pdclust_instance* pdlayout_instance ( const struct m0_layout_instance li)
inlinestatic

Definition at line 504 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ round_down()

static uint64_t round_down ( uint64_t  val,
uint64_t  size 
)
inlinestatic

Definition at line 697 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ round_up()

static uint64_t round_up ( uint64_t  val,
uint64_t  size 
)
inlinestatic

Definition at line 711 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rows_nr()

static uint32_t rows_nr ( struct m0_pdclust_layout play)
inlinestatic

Definition at line 691 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ seg_align()

static void seg_align ( struct pargrp_iomap map,
uint32_t  seg,
m0_bindex_t  end,
uint64_t  sz 
)
static

Make segment sz-aligned down and up.

Definition at line 2351 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ seg_endpos()

static m0_bcount_t seg_endpos ( const struct m0_indexvec ivec,
uint32_t  i 
)
inlinestatic

Definition at line 420 of file file.c.

Here is the caller graph for this function:

◆ seg_idx_inc_round()

static void seg_idx_inc_round ( struct pargrp_iomap map,
uint32_t  seg,
uint64_t  sz 
)
static

Increase segment's index by sz-aligned value.

Definition at line 2341 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ seg_set()

static m0_bindex_t seg_set ( struct pargrp_iomap map,
uint32_t  seg,
struct m0_ivec_varr_cursor cur,
m0_bindex_t  grpend 
)
static

Set segment by countiguous user ivec starting from cursor position at most to the parity group end. If the contiguous user ivec is less than the group end, the resulting segment will be only up to the end of that contiguous ivec.

See also
doc for m0_ivec_cursor_conti().

Definition at line 2329 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ should_req_sm_complete()

static bool should_req_sm_complete ( struct io_request req)
static

Definition at line 5939 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ should_spare_be_mapped()

static bool should_spare_be_mapped ( struct io_request req,
enum m0_pool_nd_state  dev_state 
)
static

should_spare_be_mapped() decides whether given IO request should be redirected to the spare unit device or not.

For normal IO, M0_IN(ioreq_sm_state, (IRS_READING, IRS_WRITING)), such redirection is not needed, with the exception of read IO case when the failed device is in REPAIRED state.

Note: req->ir_sns_state is used only to differentiate between two possible use cases during the degraded mode write.

Here are possible combinations of different parameters on which the decision is made.

Input parameters:

  • State of IO request. Sample set {IRS_DEGRADED_READING, IRS_DEGRADED_WRITING}
  • State of current device. Sample set {M0_PNDS_SNS_REPAIRING, M0_PNDS_SNS_REPAIRED}
  • State of SNS repair process with respect to current global fid. Sample set {SRS_REPAIR_DONE, SRS_REPAIR_NOTDONE}

Degraded read case (IRS_DEGRADED_READING):

  1. device_state == M0_PNDS_SNS_REPAIRING

    Not redirected. The extent is assigned to the failed device itself but it is filtered at the level of io_req_fop.

  2. device_state == M0_PNDS_SNS_REPAIRED

    Redirected.

Degraded write case (IRS_DEGRADED_WRITING):

  1. device_state == M0_PNDS_SNS_REPAIRED

    Redirected.

  2. device_state == M0_PNDS_SNS_REPAIRING && req->ir_sns_state == SRS_REPAIR_DONE

    Redirected. Repair is finished for the current global fid.

  3. device_state == M0_PNDS_SNS_REPAIRING && req->ir_sns_state == SRS_REPAIR_NOTDONE

    Not redirected. Repair is not finished for this global fid yet. So we just drop all pages directed towards the failed device. The data will be restored by SNS-repair in the due time later.

  4. device_state == M0_PNDS_SNS_REPAIRED && req->ir_sns_state == SRS_REPAIR_NOTDONE

    This should not be possible.

Definition at line 4507 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ target_cob_create_fop_prepare()

static int target_cob_create_fop_prepare ( struct target_ioreq ti)
static

Definition at line 6524 of file file.c.

Here is the call graph for this function:

◆ target_fid()

static struct m0_fid target_fid ( const struct io_request req,
struct m0_pdclust_tgt_addr tgt 
)
inlinestatic

Definition at line 668 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ target_ioreq_fini()

static void target_ioreq_fini ( struct target_ioreq ti)
static

Definition at line 4708 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ target_ioreq_init()

static int target_ioreq_init ( struct target_ioreq ti,
struct nw_xfer_request xfer,
const struct m0_fid cobfid,
uint64_t  ta_obj,
struct m0_rpc_session session,
uint64_t  size 
)
static

Definition at line 4631 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ target_ioreq_invariant()

static bool target_ioreq_invariant ( struct target_ioreq ti)
static

Definition at line 1174 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ target_ioreq_iofops_prepare()

static int target_ioreq_iofops_prepare ( struct target_ioreq ti,
enum page_attr  filter 
)
static

Definition at line 6566 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ target_ioreq_locate()

static struct target_ioreq* target_ioreq_locate ( struct nw_xfer_request xfer,
const struct m0_fid fid 
)
static

Definition at line 4738 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ target_ioreq_seg_add()

static void target_ioreq_seg_add ( struct target_ioreq ti,
const struct m0_pdclust_src_addr src,
const struct m0_pdclust_tgt_addr tgt,
m0_bindex_t  gob_offset,
m0_bcount_t  count,
struct pargrp_iomap map 
)
static

Definition at line 4857 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ target_ioreq_type_get()

static uint32_t target_ioreq_type_get ( struct target_ioreq ti)
inlinestatic

Definition at line 579 of file file.c.

Here is the caller graph for this function:

◆ target_ioreq_type_set()

static void target_ioreq_type_set ( struct target_ioreq ti,
enum target_ioreq_type  type 
)
inlinestatic

Definition at line 584 of file file.c.

Here is the caller graph for this function:

◆ target_offset()

static uint64_t target_offset ( uint64_t  frame,
struct m0_pdclust_layout play,
m0_bindex_t  gob_offset 
)
inlinestatic

Definition at line 571 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ target_session()

static struct m0_rpc_session* target_session ( struct io_request req,
struct m0_fid  tfid 
)
inlinestatic

Definition at line 679 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tioreq_key_eq()

static bool tioreq_key_eq ( const void *  key1,
const void *  key2 
)
static

Definition at line 600 of file file.c.

◆ tioreqs_hash_func()

static uint64_t tioreqs_hash_func ( const struct m0_htable htable,
const void *  k 
)
static

Definition at line 593 of file file.c.

◆ tolerance_of_level()

static uint64_t tolerance_of_level ( struct io_request req,
uint64_t  lv 
)
static
Todo:
This code is not required once MOTR-899 lands into dev. Tolerance for the given level.

Definition at line 3597 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unit_state()

static int unit_state ( const struct m0_pdclust_src_addr src,
const struct io_request req,
enum m0_pool_nd_state state 
)
static

Definition at line 2645 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ user_data_copy()

static int user_data_copy ( struct pargrp_iomap map,
m0_bindex_t  start,
m0_bindex_t  end,
struct iov_iter *  it,
enum copy_direction  dir,
enum page_attr  filter 
)
static

Definition at line 1294 of file file.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ user_page_map()

M0_INTERNAL int user_page_map ( struct data_buf dbuf,
unsigned long  user_addr 
)

Definition at line 1247 of file file.c.

Here is the call graph for this function:

◆ user_page_unmap()

static void user_page_unmap ( struct data_buf dbuf,
bool  set_dirty 
)
static

Definition at line 1284 of file file.c.

Here is the caller graph for this function:

◆ v_seg_endpos()

static m0_bcount_t v_seg_endpos ( struct m0_indexvec_varr ivec,
uint32_t  i 
)
inlinestatic

Definition at line 428 of file file.c.

Here is the caller graph for this function:

Variable Documentation

◆ cc_item_ops

const struct m0_rpc_item_ops cc_item_ops
static
Initial value:
= {
.rio_replied = cc_rpc_item_cb,
}
static void cc_rpc_item_cb(struct m0_rpc_item *item)
Definition: file.c:5851

Definition at line 814 of file file.c.

◆ client_buf_bulk_cb

const struct m0_net_buffer_callbacks client_buf_bulk_cb
Initial value:
= {
.nbc_cb = {
}
}
static void client_passive_recv(const struct m0_net_buffer_event *evt)
Definition: file.c:5622
M0_INTERNAL void m0_rpc_bulk_default_cb(const struct m0_net_buffer_event *evt)
Definition: bulk.c:140

Definition at line 5688 of file file.c.

◆ dtbuf_bobtype

static const struct m0_bob_type dtbuf_bobtype
static
Initial value:
= {
.bt_name = "data_buf_bobtype",
.bt_magix_offset = offsetof(struct data_buf, db_magic),
.bt_magix = M0_T1FS_DTBUF_MAGIC,
.bt_check = NULL,
}
#define NULL
Definition: misc.h:38
#define offsetof(typ, memb)
Definition: misc.h:29

Definition at line 343 of file file.c.

◆ io_item_ops

const struct m0_rpc_item_ops io_item_ops
static
Initial value:
= {
.rio_replied = io_rpc_item_cb,
}
static void io_rpc_item_cb(struct m0_rpc_item *item)
Definition: file.c:5954

Definition at line 810 of file file.c.

◆ io_sm_conf

const struct m0_sm_conf io_sm_conf
static
Initial value:
= {
.scf_name = "IO request state machine configuration",
.scf_nr_states = ARRAY_SIZE(io_states),
.scf_state = io_states,
}
#define ARRAY_SIZE(a)
Definition: misc.h:45
static struct m0_sm_state_descr io_states[]
Definition: file.c:980

Definition at line 1025 of file file.c.

◆ io_states

struct m0_sm_state_descr io_states[]
static

Definition at line 980 of file file.c.

◆ iofop_bobtype

struct m0_bob_type iofop_bobtype
static

Definition at line 339 of file file.c.

◆ iomap_ops

const struct pargrp_iomap_ops iomap_ops
static
Initial value:
= {
.pi_populate = pargrp_iomap_populate,
.pi_spans_seg = pargrp_iomap_spans_seg,
.pi_readrest = pargrp_iomap_readrest,
.pi_fullpages_find = pargrp_iomap_fullpages_count,
.pi_seg_process = pargrp_iomap_seg_process,
.pi_readold_auxbuf_alloc = pargrp_iomap_readold_auxbuf_alloc,
.pi_parity_recalc = pargrp_iomap_parity_recalc,
.pi_parity_verify = pargrp_iomap_parity_verify,
.pi_paritybufs_alloc = pargrp_iomap_paritybufs_alloc,
.pi_dgmode_process = pargrp_iomap_dgmode_process,
.pi_dgmode_postprocess = pargrp_iomap_dgmode_postprocess,
.pi_dgmode_recover = pargrp_iomap_dgmode_recover,
}
static int pargrp_iomap_parity_verify(struct pargrp_iomap *map)
Definition: file.c:1409
static int pargrp_iomap_dgmode_recover(struct pargrp_iomap *map)
Definition: file.c:3040
static bool pargrp_iomap_spans_seg(struct pargrp_iomap *map, m0_bindex_t index, m0_bcount_t count)
Definition: file.c:1931
static int pargrp_iomap_paritybufs_alloc(struct pargrp_iomap *map)
Definition: file.c:2275
static int pargrp_iomap_dgmode_postprocess(struct pargrp_iomap *map)
Definition: file.c:2861
static int pargrp_iomap_dgmode_process(struct pargrp_iomap *map, struct target_ioreq *tio, m0_bindex_t *index, uint32_t count)
Definition: file.c:2759
static int pargrp_iomap_parity_recalc(struct pargrp_iomap *map)
Definition: file.c:1502
static int pargrp_iomap_readold_auxbuf_alloc(struct pargrp_iomap *map)
Definition: file.c:2099
static int pargrp_iomap_seg_process(struct pargrp_iomap *map, uint64_t seg, bool rmw)
Definition: file.c:1965
static int pargrp_iomap_populate(struct pargrp_iomap *map, struct m0_ivec_varr_cursor *cursor)
Definition: file.c:2506
static int pargrp_iomap_readrest(struct pargrp_iomap *map)
Definition: file.c:2203
static uint64_t pargrp_iomap_fullpages_count(struct pargrp_iomap *map)
Definition: file.c:2051

Definition at line 876 of file file.c.

◆ iommstats

struct io_mem_stats iommstats

Definition at line 322 of file file.c.

◆ ioreq_bobtype

static const struct m0_bob_type ioreq_bobtype
static
Initial value:
= {
.bt_name = "io_request_bobtype",
.bt_magix_offset = offsetof(struct io_request, ir_magic),
.bt_magix = M0_T1FS_IOREQ_MAGIC,
.bt_check = NULL,
}
#define NULL
Definition: misc.h:38
#define offsetof(typ, memb)
Definition: misc.h:29

Definition at line 340 of file file.c.

◆ ioreq_oostore_ops

const struct io_request_ops ioreq_oostore_ops
static
Initial value:
= {
.iro_iomaps_prepare = ioreq_iomaps_prepare,
.iro_iomaps_destroy = ioreq_iomaps_destroy,
.iro_user_data_copy = ioreq_user_data_copy,
.iro_parity_recalc = ioreq_parity_recalc,
.iro_parity_verify = ioreq_parity_verify,
.iro_iosm_handle = ioreq_iosm_handle,
.iro_file_lock = ioreq_no_lock,
.iro_file_unlock = ioreq_no_unlock,
.iro_dgmode_read = ioreq_dgmode_read,
.iro_dgmode_write = ioreq_dgmode_write,
.iro_dgmode_recover = ioreq_dgmode_recover,
}
static int ioreq_dgmode_recover(struct io_request *req)
Definition: file.c:3570
static int ioreq_iomaps_prepare(struct io_request *req)
Definition: file.c:3187
static int ioreq_dgmode_read(struct io_request *req, bool rmw)
Definition: file.c:3807
static void ioreq_no_unlock(struct io_request *req)
Definition: file.c:4003
static int ioreq_no_lock(struct io_request *req)
Definition: file.c:3998
static int ioreq_parity_recalc(struct io_request *req)
Definition: file.c:1649
static int ioreq_parity_verify(struct io_request *req)
Definition: file.c:1611
static int ioreq_dgmode_write(struct io_request *req, bool rmw)
Definition: file.c:3711
static int ioreq_iosm_handle(struct io_request *req)
Definition: file.c:4018
static int ioreq_user_data_copy(struct io_request *req, enum copy_direction dir, enum page_attr filter)
Definition: file.c:1700
static void ioreq_iomaps_destroy(struct io_request *req)
Definition: file.c:3255

Definition at line 961 of file file.c.

◆ ioreq_ops

const struct io_request_ops ioreq_ops
static
Initial value:
= {
.iro_iomaps_prepare = ioreq_iomaps_prepare,
.iro_iomaps_destroy = ioreq_iomaps_destroy,
.iro_user_data_copy = ioreq_user_data_copy,
.iro_parity_recalc = ioreq_parity_recalc,
.iro_parity_verify = ioreq_parity_verify,
.iro_iosm_handle = ioreq_iosm_handle,
.iro_file_lock = ioreq_file_lock,
.iro_file_unlock = ioreq_file_unlock,
.iro_dgmode_read = ioreq_dgmode_read,
.iro_dgmode_write = ioreq_dgmode_write,
.iro_dgmode_recover = ioreq_dgmode_recover,
}
static int ioreq_file_lock(struct io_request *req)
Definition: file.c:3970
static int ioreq_dgmode_recover(struct io_request *req)
Definition: file.c:3570
static int ioreq_iomaps_prepare(struct io_request *req)
Definition: file.c:3187
static int ioreq_dgmode_read(struct io_request *req, bool rmw)
Definition: file.c:3807
static void ioreq_file_unlock(struct io_request *req)
Definition: file.c:3991
static int ioreq_parity_recalc(struct io_request *req)
Definition: file.c:1649
static int ioreq_parity_verify(struct io_request *req)
Definition: file.c:1611
static int ioreq_dgmode_write(struct io_request *req, bool rmw)
Definition: file.c:3711
static int ioreq_iosm_handle(struct io_request *req)
Definition: file.c:4018
static int ioreq_user_data_copy(struct io_request *req, enum copy_direction dir, enum page_attr filter)
Definition: file.c:1700
static void ioreq_iomaps_destroy(struct io_request *req)
Definition: file.c:3255

Definition at line 947 of file file.c.

◆ m0_rm_m0t1fs_group

const struct m0_uint128 m0_rm_m0t1fs_group

Definition at line 59 of file inode.c.

◆ m0t1fs_aops

const struct address_space_operations m0t1fs_aops
Initial value:
= {
.direct_IO = m0t1fs_direct_IO,
}
static ssize_t m0t1fs_direct_IO(struct kiocb *kcb, struct iov_iter *from)
Definition: file.c:6784

Definition at line 6887 of file file.c.

◆ m0t1fs_reg_file_operations

const struct file_operations m0t1fs_reg_file_operations
Initial value:
= {
.llseek = generic_file_llseek,
.read_iter = file_aio_read,
.write_iter = file_aio_write,
.unlocked_ioctl = m0t1fs_ioctl,
.fsync = m0t1fs_fsync,
.flush = m0t1fs_flush,
}
M0_INTERNAL long m0t1fs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
Definition: ioctl.c:36
static ssize_t file_aio_read(struct kiocb *kcb, struct iov_iter *from)
Definition: file.c:5544
int m0t1fs_flush(struct file *file, fl_owner_t id)
Definition: file.c:5570
static ssize_t file_aio_write(struct kiocb *kcb, struct iov_iter *from)
Definition: file.c:5348
int m0t1fs_fsync(struct file *file, loff_t start, loff_t end, int datasync)
Definition: fsync.c:354

Definition at line 5602 of file file.c.

◆ m0t1fs_reg_inode_operations

const struct inode_operations m0t1fs_reg_inode_operations
Initial value:
= {
.setattr = m0t1fs_setattr,
.getattr = m0t1fs_getattr,
.listxattr = m0t1fs_listxattr,
}
ssize_t m0t1fs_listxattr(struct dentry *dentry, char *buffer, size_t size)
Definition: dir.c:538
M0_INTERNAL int m0t1fs_setattr(struct dentry *dentry, struct iattr *attr)
Definition: dir.c:1586

Definition at line 6771 of file file.c.

◆ nwxfer_bobtype

static const struct m0_bob_type nwxfer_bobtype
static
Initial value:
= {
.bt_name = "nw_xfer_request_bobtype",
.bt_magix_offset = offsetof(struct nw_xfer_request, nxr_magic),
.bt_magix = M0_T1FS_NWREQ_MAGIC,
.bt_check = NULL,
}
#define NULL
Definition: misc.h:38
#define offsetof(typ, memb)
Definition: misc.h:29

Definition at line 342 of file file.c.

◆ pgiomap_bobtype

static const struct m0_bob_type pgiomap_bobtype
static
Initial value:
= {
.bt_name = "pargrp_iomap_bobtype",
.bt_magix_offset = offsetof(struct pargrp_iomap, pi_magic),
.bt_magix = M0_T1FS_PGROUP_MAGIC,
.bt_check = NULL,
}
#define NULL
Definition: misc.h:38
#define offsetof(typ, memb)
Definition: misc.h:29

Definition at line 341 of file file.c.

◆ tioreq_bobtype

static const struct m0_bob_type tioreq_bobtype
static
Initial value:
= {
.bt_name = "target_ioreq",
.bt_magix_offset = offsetof(struct target_ioreq, ti_magic),
.bt_magix = M0_T1FS_TIOREQ_MAGIC,
.bt_check = NULL,
}
#define NULL
Definition: misc.h:38
#define offsetof(typ, memb)
Definition: misc.h:29

Definition at line 338 of file file.c.

◆ tioreq_ops

const struct target_ioreq_ops tioreq_ops
static
Initial value:
= {
.tio_seg_add = target_ioreq_seg_add,
.tio_iofops_prepare = target_ioreq_iofops_prepare,
.tio_cc_fops_prepare = target_cob_create_fop_prepare,
}
static int target_cob_create_fop_prepare(struct target_ioreq *ti)
Definition: file.c:6524
static void target_ioreq_seg_add(struct target_ioreq *ti, const struct m0_pdclust_src_addr *src, const struct m0_pdclust_tgt_addr *tgt, m0_bindex_t gob_offset, m0_bcount_t count, struct pargrp_iomap *map)
Definition: file.c:4857
static int target_ioreq_iofops_prepare(struct target_ioreq *ti, enum page_attr filter)
Definition: file.c:6566

Definition at line 907 of file file.c.

◆ xfer_ops

const struct nw_xfer_ops xfer_ops
static
Initial value:
= {
.nxo_distribute = nw_xfer_io_distribute,
.nxo_complete = nw_xfer_req_complete,
.nxo_dispatch = nw_xfer_req_dispatch,
.nxo_tioreq_map = nw_xfer_tioreq_map,
}
static int nw_xfer_tioreq_map(struct nw_xfer_request *xfer, const struct m0_pdclust_src_addr *src, struct m0_pdclust_tgt_addr *tgt, struct target_ioreq **tio)
Definition: file.c:4520
static void nw_xfer_req_complete(struct nw_xfer_request *xfer, bool rmw)
Definition: file.c:6266
static int nw_xfer_req_dispatch(struct nw_xfer_request *xfer)
Definition: file.c:6155
static int nw_xfer_io_distribute(struct nw_xfer_request *xfer)
Definition: file.c:3394

Definition at line 837 of file file.c.