Motr  M0
io_nw_xfer.c File Reference
#include "motr/client.h"
#include "motr/client_internal.h"
#include "motr/addb.h"
#include "motr/pg.h"
#include "motr/io.h"
#include "lib/memory.h"
#include "lib/errno.h"
#include "lib/finject.h"
#include "lib/cksum_utils.h"
#include "fid/fid.h"
#include "rpc/rpclib.h"
#include "lib/ext.h"
#include "lib/misc.h"
#include "fop/fom_generic.h"
#include "sns/parity_repair.h"
#include "fd/fd.h"
#include "rpc/item.h"
#include "rpc/rpc_internal.h"
#include "lib/trace.h"
Include dependency graph for io_nw_xfer.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CLIENT
 

Functions

 M0_BOB_DEFINE (M0_INTERNAL, &nwxfer_bobtype, nw_xfer_request)
 
 M0_BOB_DEFINE (M0_INTERNAL, &tioreq_bobtype, target_ioreq)
 
static void to_op_io_map (const struct m0_op *op, struct m0_op_io *ioo)
 
static void m0_op_io_to_rpc_map (const struct m0_op_io *ioo, const struct m0_rpc_item *item)
 
static uint32_t io_di_size (struct m0_op_io *ioo)
 
static void parity_page_pos_get (struct pargrp_iomap *map, m0_bindex_t index, uint32_t *row, uint32_t *col)
 
static int dgmode_rwvec_alloc_init (struct target_ioreq *ti)
 
static void dgmode_rwvec_dealloc_fini (struct dgmode_rwvec *dg)
 
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", M0_INTERNAL, struct target_ioreq, ti_link, ti_magic, M0_TIOREQ_MAGIC, M0_TLIST_HEAD_MAGIC, ti_fid.f_container, tioreqs_hash_func, tioreq_key_eq)
 
 M0_HT_DEFINE (tioreqht, M0_INTERNAL, struct target_ioreq, uint64_t)
 
static bool target_ioreq_invariant (const struct target_ioreq *ti)
 
M0_INTERNAL bool nw_xfer_request_invariant (const struct nw_xfer_request *xfer)
 
void target_ioreq_fini (struct target_ioreq *ti)
 
void target_ioreq_cancel (struct target_ioreq *ti)
 
static struct target_ioreqtarget_ioreq_locate (struct nw_xfer_request *xfer, struct m0_fid *fid)
 
static bool should_unit_be_truncated (bool partial, enum m0_pdclust_unit_type unit_type, enum page_attr flags)
 
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)
 
M0_INTERNAL struct m0_fid target_fid (struct m0_op_io *ioo, struct m0_pdclust_tgt_addr *tgt)
 
static struct m0_rpc_sessiontarget_session (struct m0_op_io *ioo, struct m0_fid tfid)
 
static int bulk_buffer_add (struct ioreq_fop *irfop, struct m0_net_domain *dom, struct m0_rpc_bulk_buf **rbuf, uint32_t *delta, uint32_t maxsize)
 
static void irfop_fini (struct ioreq_fop *irfop)
 
static void * buf_aux_chk_get (struct m0_bufvec *aux, enum page_attr p_attr, uint32_t seg_idx, bool rd_in_wr)
 
static int target_ioreq_iofops_prepare (struct target_ioreq *ti, enum page_attr filter)
 
static int target_cob_fop_prepare (struct target_ioreq *ti)
 
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 int nw_xfer_tioreq_get (struct nw_xfer_request *xfer, struct m0_fid *fid, uint64_t ta_obj, struct m0_rpc_session *session, uint64_t size, struct target_ioreq **out)
 
static void databufs_set_dgw_mode (struct pargrp_iomap *iomap, struct m0_pdclust_layout *play, struct m0_ext *ext)
 
static void paritybufs_set_dgw_mode (struct pargrp_iomap *iomap, struct m0_op_io *ioo, uint64_t unit)
 
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 bool should_spare_be_mapped (struct m0_op_io *ioo, enum m0_pool_nd_state dev_state)
 
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)
 
M0_INTERNAL void nw_xfer_request_init (struct nw_xfer_request *xfer)
 
M0_INTERNAL void nw_xfer_request_fini (struct nw_xfer_request *xfer)
 

Variables

const struct m0_bob_type nwxfer_bobtype
 
const struct m0_bob_type tioreq_bobtype
 
static const struct target_ioreq_ops tioreq_ops
 
static const struct nw_xfer_ops xfer_ops
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CLIENT

Definition at line 44 of file io_nw_xfer.c.

Function Documentation

◆ buf_aux_chk_get()

static void* buf_aux_chk_get ( struct m0_bufvec aux,
enum page_attr  p_attr,
uint32_t  seg_idx,
bool  rd_in_wr 
)
static

Helper function which will return the buffer address based on the page attr, fop phase and aux bufvec.

Definition at line 827 of file io_nw_xfer.c.

Here is the caller graph for this function:

◆ bulk_buffer_add()

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

Pair data/parity buffers with the io fop rpc. This is heavily based on m0t1fs/linux_kernel/file.ctarget_ioreq_iofops_prepare

Parameters
irfopThe io fop that needs bulk buffers adding.
domThe network domain this rpc will be sent in.
rbuf[out]The rpc bulk buffer that contains the target-iorequest's extents.
delta[out]The extra space in the fop needed for metadata.
maxsizeCaller provided limit.
Returns
0 for success, -errno otherwise.

Definition at line 760 of file io_nw_xfer.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_pdclust_layout play,
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 1406 of file io_nw_xfer.c.

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

◆ dgmode_rwvec_alloc_init()

static int dgmode_rwvec_alloc_init ( struct target_ioreq ti)
static

Allocates an index and buffer vector(in structure dgmode_rwvec) for a degraded mode IO. This is heavily based on m0t1fs/linux_kernel/file.cdgmode_rwvec_alloc_init

Parameters
tiThe target_ioreq fop asking for the allocation.
Returns
0 for success, or -errno.

Definition at line 151 of file io_nw_xfer.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

Free index and buffer vector stored in structure dgmode_rwvec for a degraded mode IO. This is heavily based on m0t1fs/linux_kernel/file.cdgmode_rwvec_dealloc_fini

Parameters
dgThe dgmode_rwvec to be finalised.
Returns
NULL

Definition at line 244 of file io_nw_xfer.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 ( struct m0_op_io ioo)
static

Calculate the size needed for per-segment on-wire data integrity. Note: Client leaves its applications to decide how to use locks on objects, so it doesn't manage any lock. But file lock is needed to calculate di size, a file lock is faked here to get di details. Clearly, a more reliable way to get di size is needed.

Parameters
iooThe IO operation, to find the client instance.
Returns
the size of data integrity data.

Definition at line 98 of file io_nw_xfer.c.

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

◆ irfop_fini()

static void irfop_fini ( struct ioreq_fop irfop)
static

Finalises an io request fop, (releases bulk buffers). This is heavily based on m0t1fs/linux_kernel/file.cirfop_fini

Parameters
irfopThe io request fop to finalise.

Definition at line 810 of file io_nw_xfer.c.

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

◆ M0_BOB_DEFINE() [1/2]

M0_BOB_DEFINE ( M0_INTERNAL  ,
nwxfer_bobtype,
nw_xfer_request   
)

BOB definitions for the assorted parts of io requests and nwxfer

◆ M0_BOB_DEFINE() [2/2]

M0_BOB_DEFINE ( M0_INTERNAL  ,
tioreq_bobtype,
target_ioreq   
)

◆ M0_HT_DEFINE()

M0_HT_DEFINE ( tioreqht  ,
M0_INTERNAL  ,
struct target_ioreq  ,
uint64_t   
)

◆ M0_HT_DESCR_DEFINE()

M0_HT_DESCR_DEFINE ( tioreqht  ,
"Hash of target_ioreq objects"  ,
M0_INTERNAL  ,
struct target_ioreq  ,
ti_link  ,
ti_magic  ,
M0_TIOREQ_MAGIC  ,
M0_TLIST_HEAD_MAGIC  ,
ti_fid.  f_container,
tioreqs_hash_func  ,
tioreq_key_eq   
)

◆ m0_op_io_to_rpc_map()

static void m0_op_io_to_rpc_map ( const struct m0_op_io ioo,
const struct m0_rpc_item item 
)
static

Definition at line 80 of file io_nw_xfer.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

Distributes file data into target_ioreq objects as required and populates target_ioreq::ti_ivec and target_ioreq::ti_bufvec. This is heavily based on m0t1fs/linux_kernel/file.cnw_xfer_io_distribute

Parameters
xferThe network transfer request.
Returns
0 for success, -errno otherwise.

Definition at line 1460 of file io_nw_xfer.c.

Here is the call graph for this function:

◆ nw_xfer_req_complete()

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

Completes all the target io requests in a network transfer request. Collects the total number of bytes read/written, and determines the final return code. This is heavily based on m0t1fs/linux_kernel/file.cnw_xfer_req_complete Call with ioo->ioo_sm.sm_grp locked.

Parameters
xferThe network transfer request.
rmwWhether this request was part of a multiple requests (rmw).

XXX morse: there are better ways of determining whether this is a read request

Definition at line 1667 of file io_nw_xfer.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

Prepares each target io request in the network transfer requests, and submit the fops. This is heavily based on m0t1fs/linux_kernel/file.cnw_xfer_req_dispatch

Parameters
xferThe network transfer request.
Returns
0 for success, -errno otherwise.

Definition at line 1795 of file io_nw_xfer.c.

Here is the call graph for this function:

◆ nw_xfer_request_fini()

M0_INTERNAL void nw_xfer_request_fini ( struct nw_xfer_request xfer)

Finalises a network transfer request. This is heavily based on m0t1fs/linux_kernel/file.cnw_xfer_request_fini

Parameters
xfer[out]The network transfer request to finalise.

Definition at line 2159 of file io_nw_xfer.c.

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

◆ nw_xfer_request_init()

M0_INTERNAL void nw_xfer_request_init ( struct nw_xfer_request xfer)

Initialises a network transfer request. This is heavily based on m0t1fs/linux_kernel/file.cnw_xfer_request_init

Parameters
xfer[out]The network transfer request to initialise.

Definition at line 2130 of file io_nw_xfer.c.

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

◆ nw_xfer_request_invariant()

M0_INTERNAL bool nw_xfer_request_invariant ( const struct nw_xfer_request xfer)

This is heavily based on m0t1fs/linux_kernel/file.cnw_xfer_request_invariant

Definition at line 340 of file io_nw_xfer.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,
struct m0_fid fid,
uint64_t  ta_obj,
struct m0_rpc_session session,
uint64_t  size,
struct target_ioreq **  out 
)
static

Retrieves (possibly allocating and initialising) a target io request for the provided network transfer requests. This is heavily based on m0t1fs/linux_kernel/file.cnw_xfer_tioreq_get

Parameters
xferThe network transfer.
fidThe cob fid that the request will operate on.
ta_objWhich object in the global layout the cobfid corresponds to.
sessionThe session the request will be sent on.
sizeThe size of the request.
out[out]The discovered (or allocated) target io request.

Definition at line 1351 of file io_nw_xfer.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

Determines which targets (spare or not) of the io map the network transfer requests should be mapped to. This is heavily based on m0t1fs/linux_kernel/file.cnw_xfer_tioreq_map

Parameters
xferThe network transfer request.
srcunit address in the parity groups.
tgt[out]unit address in the target devices.
tio[out]The retrieved (or allocated) target request.
Returns
0 for success, -errno otherwise.

Definition at line 2027 of file io_nw_xfer.c.

Here is the call 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 124 of file io_nw_xfer.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_op_io ioo,
uint64_t  unit 
)
static

Sets paritybufs for the parity to the degraded write mode.

Definition at line 1431 of file io_nw_xfer.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 m0_op_io ioo,
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 2002 of file io_nw_xfer.c.

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

◆ should_unit_be_truncated()

static bool should_unit_be_truncated ( bool  partial,
enum m0_pdclust_unit_type  unit_type,
enum page_attr  flags 
)
static

Definition at line 458 of file io_nw_xfer.c.

Here is the caller graph for this function:

◆ target_cob_fop_prepare()

static int target_cob_fop_prepare ( struct target_ioreq ti)
static

Definition at line 1173 of file io_nw_xfer.c.

Here is the call graph for this function:

◆ target_fid()

M0_INTERNAL struct m0_fid target_fid ( struct m0_op_io ioo,
struct m0_pdclust_tgt_addr tgt 
)

This is heavily based on m0t1fs/linux_kernel/file.ctarget_fid().

Definition at line 710 of file io_nw_xfer.c.

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

◆ target_ioreq_cancel()

void target_ioreq_cancel ( struct target_ioreq ti)

Cancel a target_ioreq.

Parameters
tiThe target_ioreq to cancel.

Definition at line 423 of file io_nw_xfer.c.

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

◆ target_ioreq_fini()

void target_ioreq_fini ( struct target_ioreq ti)

This is heavily based on m0t1fs/linux_kernel/file.ctarget_ioreq_fini

Definition at line 364 of file io_nw_xfer.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

Initialises a target io request. This is heavily based on m0t1fs/linux_kernel/file.ctarget_ioreq_init

Parameters
ti[out]The target io request to initialise.
xferThe corresponding network transfer request.
cobfidThe fid of the cob this request will act on.
ta_objWhich object in the global layout the cobfid corresponds to.
sessionThe rpc session that should be used to send this request.
sizeThe size of the request in bytes.
Returns
0 for success, -errno otherwise.

Definition at line 1195 of file io_nw_xfer.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 ( const struct target_ioreq ti)
static

Checks a target_ioreq struct is correct. This is heavily based on m0t1fs/linux_kernel/file.ctarget_ioreq_invariant

Parameters
tiThe target_ioreq fop to check.
Returns
true or false.

Definition at line 324 of file io_nw_xfer.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

Assembles io fops for the specified target server. This is heavily based on m0t1fs/linux_kernel/file.ctarget_ioreq_iofops_prepare

Parameters
tiThe target io request whose data/parity fops should be assembled.
filterWhether to restrict the set of fops to prepare.
Returns
0 for success, -errno otherwise.

Definition at line 843 of file io_nw_xfer.c.

Here is the call graph for this function:

◆ target_ioreq_locate()

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

This is heavily based on m0t1fs/linux_kernel/file.ctarget_ioreq_locate

Definition at line 435 of file io_nw_xfer.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

Adds an io segment to index vector and buffer vector in target_ioreq structure. This is heavily based on m0t1fs/linux_kernel/file.ctarget_ioreq_seg_add

Parameters
tiThe target io request.
srcWhere in the global file the io occurs.
tgtWhere in the target servers 'tile' the io occurs.
gob_offsetOffset in the global file.
countNumber of bytes in this operation.
mapMap of data/parity buffers, used to tie ti to the corresponding buffers.

CKSUM_TODO: Need to handle degraded write cksum update

Ignore hole because of data size not alligned pool width

Storing the values of goff(checksum offset) into the goff_ivec according to target offset. This creates a mapping between target offset and cheksum offset.

This mapping will be used when we get read reply FOP to locae the checksum in application provided buffer

Definition at line 479 of file io_nw_xfer.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 m0_op_io ioo,
struct m0_fid  tfid 
)
inlinestatic

Finds the rpc session to use to contact the server hosting a particular target:fid (cob). This is heavily based on m0t1fs/linux_kernel/file.ctarget_session

Parameters
iooThe IO operation.
tfidThe cob fid to look for.
apointer to the rpc_session to use to contact this target.

Definition at line 731 of file io_nw_xfer.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

Compares keys for target-io requets. This is heavily based on m0t1fs/linux_kernel/file.ctioreq_key_eq.

Parameters
key1The key of the first target-io request.
key2The key of the second target-io request.
Returns
true or false.

Definition at line 299 of file io_nw_xfer.c.

Here is the caller graph for this function:

◆ tioreqs_hash_func()

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

Generates a hash for a target-io request. This is heavily based on m0t1fs/linux_kernel/file.ctioreqs_hash_func.

Parameters
htableThe hash table in use.
kPointer to the key of the entry to hash.
Returns
the hash key.

Definition at line 279 of file io_nw_xfer.c.

Here is the caller graph for this function:

◆ to_op_io_map()

static void to_op_io_map ( const struct m0_op op,
struct m0_op_io ioo 
)
static

Definition at line 70 of file io_nw_xfer.c.

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

Variable Documentation

◆ nwxfer_bobtype

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

BOB types for the assorted parts of io requests and nwxfer

BOB initialisation for the assorted parts of io requests and nwxfer

Definition at line 48 of file io_nw_xfer.c.

◆ tioreq_bobtype

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

Definition at line 49 of file io_nw_xfer.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_fop_prepare,
}
static int target_cob_fop_prepare(struct target_ioreq *ti)
Definition: io_nw_xfer.c:1173
static int target_ioreq_iofops_prepare(struct target_ioreq *ti, enum page_attr filter)
Definition: io_nw_xfer.c:843
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: io_nw_xfer.c:479

Definition at line 1167 of file io_nw_xfer.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 void nw_xfer_req_complete(struct nw_xfer_request *xfer, bool rmw)
Definition: io_nw_xfer.c:1667
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: io_nw_xfer.c:2027
static int nw_xfer_req_dispatch(struct nw_xfer_request *xfer)
Definition: io_nw_xfer.c:1795
static int nw_xfer_io_distribute(struct nw_xfer_request *xfer)
Definition: io_nw_xfer.c:1460

Definition at line 2123 of file io_nw_xfer.c.