Motr  M0
client_internal.h File Reference
#include "module/instance.h"
#include "motr/init.h"
#include "ioservice/io_fops.h"
#include "conf/schema.h"
#include "conf/confc.h"
#include "layout/pdclust.h"
#include "pool/pool.h"
#include "reqh/reqh.h"
#include "rm/rm.h"
#include "rm/rm_rwlock.h"
#include "lib/refs.h"
#include "lib/hash.h"
#include "file/file.h"
#include "motr/ha.h"
#include "addb2/identifier.h"
#include "be/ut/helper.h"
#include "motr/client.h"
#include "motr/idx.h"
#include "motr/pg.h"
#include "motr/sync.h"
#include "fop/fop.h"
#include "dtm0/domain.h"
Include dependency graph for client_internal.h:

Go to the source code of this file.

Data Structures

struct  m0_ast_rc
 
struct  m0_op_common
 
struct  m0_op_idx
 
struct  m0_op_obj
 
struct  m0_op_io
 
struct  m0_io_args
 
struct  m0_op_md
 
union  m0_max_size_op
 
struct  m0_op_sync
 
struct  m0_ios_cob_req
 
struct  m0_client_layout_ops
 
struct  m0_client
 
struct  m0_rm_lock_ctx
 
struct  m0_rm_lock_req
 

Macros

#define __MOTR_CLIENT_INTERNAL_H__
 
#define M0_CLIENT_THREAD_ENTER
 
#define OP_OBJ2CODE(op_obj)   op_obj->oo_oc.oc_op.op_code
 
#define OP_IDX2CODE(op_idx)   op_idx->oi_oc.oc_op.op_code
 
#define MOCK
 
#define CLIENT_FOR_M0T1FS
 
#define MOTR_MDCOB_LOOKUP_SKIP   3
 

Enumerations

enum  { M0_OBJ_NAME_MAX_LEN = 64 }
 
enum  { M0_RM_HBUCKET_NR = 100 }
 
enum  m0__entity_states {
  M0_ES_INIT = 1, M0_ES_CREATING, M0_ES_DELETING, M0_ES_OPENING,
  M0_ES_OPEN, M0_ES_CLOSING, M0_ES_FAILED
}
 
enum  m0_pbuf_type { M0_PBUF_DIR, M0_PBUF_IND, M0_PBUF_NONE }
 
enum  m0_cob_req_states { COB_REQ_ACTIVE, COB_REQ_SENDING, COB_REQ_DONE }
 
enum  {
  M0_MIN_BUF_SHIFT = 9, M0_RPC_TIMEOUT = 60, M0_RPC_MAX_RETRIES = 60, M0_RPC_RESEND_INTERVAL,
  M0_MAX_NR_RPC_IN_FLIGHT = 100, M0_AST_THREAD_TIMEOUT = 10, M0_MAX_NR_CONTAINERS = 1024, M0_MAX_NR_IOS = 128,
  M0_MD_REDUNDANCY = 3
}
 
enum  initlift_direction { SHUTDOWN = -1, STARTUP = 1 }
 

Functions

M0_INTERNAL bool entity_invariant_full (struct m0_entity *ent)
 
M0_INTERNAL bool entity_invariant_locked (const struct m0_entity *ent)
 
void m0_op_fini (struct m0_op *op)
 
bool m0_op_md_invariant (const struct m0_op_md *mop)
 
 M0_HT_DECLARE (rm_ctx, M0_INTERNAL, struct m0_rm_lock_ctx, struct m0_fid)
 
M0_INTERNAL int m0_obj_lock_get (struct m0_obj *obj, struct m0_rm_lock_req *req, struct m0_clink *clink, enum m0_rm_rwlock_req_type rw_type)
 
M0_INTERNAL int m0_obj_lock_get_sync (struct m0_obj *obj, struct m0_rm_lock_req *req, enum m0_rm_rwlock_req_type rw_type)
 
 M0_BOB_DECLARE (M0_INTERNAL, m0_op_common)
 
 M0_BOB_DECLARE (M0_INTERNAL, m0_op_obj)
 
 M0_BOB_DECLARE (M0_INTERNAL, m0_op)
 
 M0_BOB_DECLARE (M0_INTERNAL, m0_ast_rc)
 
M0_INTERNAL int m0_client_global_init (void)
 
M0_INTERNAL void m0_client_global_fini (void)
 
M0_INTERNAL struct m0_confcm0_confc (struct m0_client *m0c)
 
M0_INTERNAL int m0_op_executed (struct m0_op *op)
 
M0_INTERNAL int m0_op_stable (struct m0_op *op)
 
M0_INTERNAL int m0_op_failed (struct m0_op *op)
 
M0_INTERNAL int m0_op_get (struct m0_op **op, size_t size)
 
M0_INTERNAL struct m0_clientm0__entity_instance (const struct m0_entity *entity)
 
M0_INTERNAL struct m0_clientm0__op_instance (const struct m0_op *op)
 
M0_INTERNAL struct m0_opm0__ioo_to_op (struct m0_op_io *ioo)
 
M0_INTERNAL struct m0_clientm0__obj_instance (const struct m0_obj *obj)
 
M0_INTERNAL struct m0_clientm0__oo_instance (struct m0_op_obj *oo)
 
M0_INTERNAL bool m0__is_oostore (struct m0_client *instance)
 
M0_INTERNAL int m0_op_alloc (struct m0_op **op, size_t op_size)
 
M0_INTERNAL int m0_op_init (struct m0_op *op, const struct m0_sm_conf *conf, struct m0_entity *entity)
 
M0_INTERNAL void m0_client_init_io_op (void)
 
M0_INTERNAL bool m0_op_obj_ast_rc_invariant (struct m0_ast_rc *ar)
 
M0_INTERNAL bool m0_op_obj_invariant (struct m0_op_obj *oo)
 
M0_INTERNAL bool m0_op_io_invariant (const struct m0_op_io *iop)
 
M0_INTERNAL struct m0_rpc_sessionm0_obj_container_id_to_session (struct m0_pool_version *pv, uint64_t container_id)
 
M0_INTERNAL struct m0_localitym0__locality_pick (struct m0_client *cinst)
 
M0_INTERNAL bool m0__obj_poolversion_is_valid (const struct m0_obj *obj)
 
M0_INTERNAL int m0__obj_namei_send (struct m0_op_obj *oo)
 
M0_INTERNAL int m0__obj_namei_cancel (struct m0_op *op)
 
M0_INTERNAL int m0__idx_cancel (struct m0_op_idx *oi)
 
M0_INTERNAL int m0__obj_attr_get_sync (struct m0_obj *obj)
 
M0_INTERNAL int m0_layout_mds_lookup (struct m0_client *m0c, uint64_t lid, struct m0_client_layout **l_out)
 
M0_INTERNAL void m0_entity_init (struct m0_entity *entity, struct m0_realm *parent, const struct m0_uint128 *id, const enum m0_entity_type type)
 
M0_INTERNAL int m0__obj_pool_version_get (struct m0_obj *obj, struct m0_pool_version **pv)
 
M0_INTERNAL uint64_t m0__obj_layout_id_get (struct m0_op_obj *oo)
 
M0_INTERNAL int m0__obj_layout_instance_build (struct m0_client *cinst, const uint64_t layout_id, const struct m0_fid *fid, struct m0_layout_instance **linst)
 
M0_INTERNAL int m0__cob_poolversion_get (struct m0_obj *obj)
 
M0_INTERNAL int obj_fid_make_name (char *name, size_t name_len, const struct m0_fid *fid)
 
M0_INTERNAL struct m0_objm0__obj_entity (struct m0_entity *entity)
 
M0_INTERNAL uint64_t m0__obj_lid (struct m0_obj *obj)
 
M0_INTERNAL enum m0_client_layout_type m0__obj_layout_type (struct m0_obj *obj)
 
M0_INTERNAL struct m0_fid m0__obj_pver (struct m0_obj *obj)
 
M0_INTERNAL void m0__obj_attr_set (struct m0_obj *obj, struct m0_fid pver, uint64_t lid)
 
M0_INTERNAL bool m0__obj_pool_version_is_valid (const struct m0_obj *obj)
 
M0_INTERNAL bool m0__obj_is_parity_verify_mode (struct m0_client *instance)
 
M0_INTERNAL bool m0__obj_is_di_enabled (struct m0_op_io *ioo)
 
M0_INTERNAL bool m0__obj_is_cksum_validation_allowed (struct m0_op_io *ioo)
 
M0_INTERNAL int m0__obj_io_build (struct m0_io_args *args, struct m0_op **op)
 
M0_INTERNAL void m0__obj_op_done (struct m0_op *op)
 
M0_INTERNAL bool m0__is_read_op (struct m0_op *op)
 
M0_INTERNAL bool m0__is_update_op (struct m0_op *op)
 
M0_INTERNAL int m0__io_ref_get (struct m0_client *m0c)
 
M0_INTERNAL void m0__io_ref_put (struct m0_client *m0c)
 
M0_INTERNAL struct m0_filem0_client_fop_to_file (struct m0_fop *fop)
 
M0_INTERNAL bool entity_id_is_valid (const struct m0_uint128 *id)
 
M0_INTERNAL struct m0_clientm0__idx_instance (const struct m0_idx *idx)
 

Variables

enum m0_cob_req_states M0_XCA_ENUM
 
struct m0_semaphore cpus_sem
 
const struct m0_bob_type oc_bobtype
 
const struct m0_bob_type oo_bobtype
 
const struct m0_bob_type op_bobtype
 
const struct m0_bob_type ar_bobtype
 
struct m0_sm_conf m0_op_conf
 
struct m0_sm_conf entity_conf
 

Macro Definition Documentation

◆ __MOTR_CLIENT_INTERNAL_H__

#define __MOTR_CLIENT_INTERNAL_H__

Definition at line 26 of file client_internal.h.

◆ CLIENT_FOR_M0T1FS

#define CLIENT_FOR_M0T1FS

Definition at line 39 of file client_internal.h.

◆ M0_CLIENT_THREAD_ENTER

#define M0_CLIENT_THREAD_ENTER

Definition at line 31 of file client_internal.h.

◆ MOCK

#define MOCK

Definition at line 38 of file client_internal.h.

◆ MOTR_MDCOB_LOOKUP_SKIP

#define MOTR_MDCOB_LOOKUP_SKIP   3

motr clients other than S3, may not store pver in meta-data, thus they have to use md-cob lookup to get pver attribute.

Definition at line 78 of file client_internal.h.

◆ OP_IDX2CODE

#define OP_IDX2CODE (   op_idx)    op_idx->oi_oc.oc_op.op_code

Definition at line 36 of file client_internal.h.

◆ OP_OBJ2CODE

#define OP_OBJ2CODE (   op_obj)    op_obj->oo_oc.oc_op.op_code

Definition at line 34 of file client_internal.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Maximum length for an object's name.

Enumerator
M0_OBJ_NAME_MAX_LEN 

Definition at line 83 of file client_internal.h.

◆ anonymous enum

anonymous enum

Number of buckets for m0_::m0_rm_ctxs hash-table.

Enumerator
M0_RM_HBUCKET_NR 

Definition at line 90 of file client_internal.h.

◆ anonymous enum

anonymous enum

miscallaneous constants

Enumerator
M0_MIN_BUF_SHIFT 
M0_RPC_TIMEOUT 
M0_RPC_MAX_RETRIES 
M0_RPC_RESEND_INTERVAL 
M0_MAX_NR_RPC_IN_FLIGHT 
M0_AST_THREAD_TIMEOUT 
M0_MAX_NR_CONTAINERS 
M0_MAX_NR_IOS 
M0_MD_REDUNDANCY 

Definition at line 468 of file client_internal.h.

◆ initlift_direction

The initlift state machine moves in one of these two directions.

Enumerator
SHUTDOWN 
STARTUP 

Definition at line 512 of file client_internal.h.

◆ m0__entity_states

Enumerator
M0_ES_INIT 
M0_ES_CREATING 
M0_ES_DELETING 
M0_ES_OPENING 
M0_ES_OPEN 
M0_ES_CLOSING 
M0_ES_FAILED 

Definition at line 94 of file client_internal.h.

◆ m0_cob_req_states

SM states of component object (COB) request.

Enumerator
COB_REQ_ACTIVE 
COB_REQ_SENDING 
COB_REQ_DONE 

Definition at line 443 of file client_internal.h.

◆ m0_pbuf_type

Parity buffers used for addressing an IO request.

Enumerator
M0_PBUF_DIR 

Explicitly allocated buffers. This is done during: i. Read operation in parity-verify mode (independent of the layout). ii. Write operation when the layout is not replicated iii. degraded read operation

M0_PBUF_IND 

Hold a pointer to data buffer. It's required for write IO on an object with the replicated layout.

M0_PBUF_NONE 

Parity units are not required. Used for read IO without parity verify mode.

Definition at line 107 of file client_internal.h.

Function Documentation

◆ entity_id_is_valid()

M0_INTERNAL bool entity_id_is_valid ( const struct m0_uint128 id)

Check if entity's id is valid.

Definition at line 354 of file client.c.

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

◆ entity_invariant_full()

M0_INTERNAL bool entity_invariant_full ( struct m0_entity ent)

Definition at line 300 of file client.c.

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

◆ entity_invariant_locked()

M0_INTERNAL bool entity_invariant_locked ( const struct m0_entity ent)

Entity invariant. Checks type and state machine.

Parameters
entAn entity.
Returns
Whether the entities type is valid.

Definition at line 320 of file client.c.

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

◆ m0__cob_poolversion_get()

M0_INTERNAL int m0__cob_poolversion_get ( struct m0_obj obj)

Fetches the pool version of supplied object and stores as an object attribute.

Parameters
objobject whose pool version needs to be found.
Returns
0 if the operation succeeds or an error code (<0) otherwise.

◆ m0__entity_instance()

M0_INTERNAL struct m0_client* m0__entity_instance ( const struct m0_entity entity)

Returns the m0_client client instance, found from the provided operation.

Parameters
opThe Operation to find the instance for.
Returns
A pointer to the m0_ instance.

-------------------------------------------------------------------------—*

Helper functions *

Definition at line 226 of file client.c.

Here is the caller graph for this function:

◆ m0__idx_instance()

M0_INTERNAL struct m0_client* m0__idx_instance ( const struct m0_idx idx)

Returns the m0_client instance, found from the provided index.

Parameters
idxThe index to find the instance for.
Returns
A pointer to the m0_client instance.

Definition at line 269 of file client.c.

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

◆ m0__io_ref_get()

M0_INTERNAL int m0__io_ref_get ( struct m0_client m0c)

Definition at line 868 of file client_init.c.

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

◆ m0__io_ref_put()

M0_INTERNAL void m0__io_ref_put ( struct m0_client m0c)

Definition at line 897 of file client_init.c.

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

◆ m0__ioo_to_op()

M0_INTERNAL struct m0_op* m0__ioo_to_op ( struct m0_op_io ioo)

Returns generic client op from io op.

Definition at line 249 of file client.c.

Here is the caller graph for this function:

◆ m0__is_oostore()

M0_INTERNAL bool m0__is_oostore ( struct m0_client instance)

Returns if client instance is operating under oostore mode.

Definition at line 255 of file client.c.

Here is the caller graph for this function:

◆ m0__is_read_op()

M0_INTERNAL bool m0__is_read_op ( struct m0_op op)

Definition at line 296 of file utils.c.

Here is the caller graph for this function:

◆ m0__is_update_op()

M0_INTERNAL bool m0__is_update_op ( struct m0_op op)

Definition at line 290 of file utils.c.

Here is the caller graph for this function:

◆ m0__locality_pick()

M0_INTERNAL struct m0_locality* m0__locality_pick ( struct m0_client cinst)

Selects a locality for an operation.

Parameters
m0cThe client instance we are working with.
Returns
the pointer to assigned locality for success, NULL otherwise.

Pick a locality: Motr and the new locality interface(chore) now uses TLS to store data and these data are set when a "motr" thread is created. An application thread (not the main thread calling m0_init, considering ST multi-threading framework), it doesn't have the same TLS by nature, which causes a problem when it calls motr functions like m0_locality_here/get directly as below.

Ensure to use m0_thread_adopt/shun to make a thread (non-)motrism when a thread starts/ends.

TODO: more intelligent locality selection policy based on fid and workload.

Definition at line 290 of file client.c.

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

◆ m0__obj_attr_get_sync()

M0_INTERNAL int m0__obj_attr_get_sync ( struct m0_obj obj)

Get object's attributes from services synchronously.

Parameters
objobject to be queried for.
Returns
0 if success or an error code otherwise.

Definition at line 1974 of file cob.c.

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

◆ m0__obj_attr_set()

M0_INTERNAL void m0__obj_attr_set ( struct m0_obj obj,
struct m0_fid  pver,
uint64_t  lid 
)

Definition at line 151 of file obj.c.

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

◆ m0__obj_entity()

M0_INTERNAL struct m0_obj* m0__obj_entity ( struct m0_entity entity)

TODO: doxygen

Definition at line 51 of file obj.c.

Here is the caller graph for this function:

◆ m0__obj_instance()

M0_INTERNAL struct m0_client* m0__obj_instance ( const struct m0_obj obj)

Returns the m0_ client instance, found from the provided object.

Parameters
objThe object to find the instance for.
Returns
A pointer to the m0_ instance.

Definition at line 261 of file client.c.

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

◆ m0__obj_io_build()

M0_INTERNAL int m0__obj_io_build ( struct m0_io_args args,
struct m0_op **  op 
)

Definition at line 677 of file io.c.

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

◆ m0__obj_is_cksum_validation_allowed()

M0_INTERNAL bool m0__obj_is_cksum_validation_allowed ( struct m0_op_io ioo)

Definition at line 665 of file io.c.

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

◆ m0__obj_is_di_enabled()

M0_INTERNAL bool m0__obj_is_di_enabled ( struct m0_op_io ioo)

Definition at line 660 of file io.c.

Here is the caller graph for this function:

◆ m0__obj_is_parity_verify_mode()

M0_INTERNAL bool m0__obj_is_parity_verify_mode ( struct m0_client instance)

Definition at line 655 of file io.c.

Here is the caller graph for this function:

◆ m0__obj_layout_id_get()

M0_INTERNAL uint64_t m0__obj_layout_id_get ( struct m0_op_obj oo)

Gets the default layout identifier from confd.

Parameters
instanceThe client instance containing information of confd.
Returns
Default layout id.

Definition at line 384 of file obj.c.

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

◆ m0__obj_layout_instance_build()

M0_INTERNAL int m0__obj_layout_instance_build ( struct m0_client cinst,
const uint64_t  layout_id,
const struct m0_fid fid,
struct m0_layout_instance **  linst 
)

Builds a layout instance using the supplied layout.

Parameters
cinstclient instance.
layout_idID of the layout.
fid(global) fid of the object this instance is associated to.
[out]linstnew layout instance.
Returns
0 if the operation succeeds or an error code (<0) otherwise.
Remarks
This function might trigger network traffic.

Definition at line 403 of file obj.c.

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

◆ m0__obj_layout_type()

M0_INTERNAL enum m0_client_layout_type m0__obj_layout_type ( struct m0_obj obj)

Definition at line 139 of file obj.c.

Here is the call graph for this function:

◆ m0__obj_lid()

M0_INTERNAL uint64_t m0__obj_lid ( struct m0_obj obj)

Definition at line 126 of file obj.c.

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

◆ m0__obj_namei_cancel()

M0_INTERNAL int m0__obj_namei_cancel ( struct m0_op op)

Cancels fops sent during namei launch operation

Parameters
opoperation to be cancelled
Returns
0 if success ot an error code otherwise

Definition at line 1915 of file cob.c.

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

◆ m0__obj_namei_send()

M0_INTERNAL int m0__obj_namei_send ( struct m0_op_obj oo)

Sends COB fops to mdservices or ioservices depending on COB operation's protocol.

Parameters
ooobject operation being processed.
Returns
0 if success or an error code otherwise.

save cr in op structure, will be used in op cancel operation priv_lock can be skipped because it is just initialized. set referenced flag in cob request required during free

Skip meta-data lookup if obj.ob_attr.oa_pver is not empty. pver is not empty that means calling application has capability to store meta-data(pver) and has sent pver to open/delete entity.

For DELETE entity we skipped md cob if M0_ENF_META is set, but we still wants to send data cob. This case is handled here by posting cob_ast_ios_io_send AST.

Definition at line 1804 of file cob.c.

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

◆ m0__obj_op_done()

M0_INTERNAL void m0__obj_op_done ( struct m0_op op)

Definition at line 691 of file io.c.

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

◆ m0__obj_pool_version_get()

M0_INTERNAL int m0__obj_pool_version_get ( struct m0_obj obj,
struct m0_pool_version **  pv 
)

Gets current valid pool version from client instance.

Parameters
instanceThe client instance containing information of pool and pool versions.
pvThe returned pool version.

Validate the cached pool version.

Definition at line 346 of file obj.c.

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

◆ m0__obj_pool_version_is_valid()

M0_INTERNAL bool m0__obj_pool_version_is_valid ( const struct m0_obj obj)

Definition at line 169 of file obj.c.

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

◆ m0__obj_poolversion_is_valid()

M0_INTERNAL bool m0__obj_poolversion_is_valid ( const struct m0_obj obj)

Checks object's cached pool version is valid.

Parameters
objThe object to be checked.
Returns
true for valid pool version, false otherwise.

◆ m0__obj_pver()

M0_INTERNAL struct m0_fid m0__obj_pver ( struct m0_obj obj)

Definition at line 163 of file obj.c.

Here is the caller graph for this function:

◆ m0__oo_instance()

M0_INTERNAL struct m0_client* m0__oo_instance ( struct m0_op_obj oo)

Returns the client instance associated to an object operation.

Parameters
ooobject operation pointing to the instance.
Returns
a pointer to the client instance associated to the entity.

Definition at line 43 of file obj.c.

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

◆ m0__op_instance()

M0_INTERNAL struct m0_client* m0__op_instance ( const struct m0_op op)

Returns the m0_ client instance, found from the provided operation.

Parameters
opThe Operation to find the instance for.
Returns
A pointer to the m0_ instance.

Definition at line 236 of file client.c.

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

◆ M0_BOB_DECLARE() [1/4]

M0_BOB_DECLARE ( M0_INTERNAL  ,
m0_op_common   
)

◆ M0_BOB_DECLARE() [2/4]

M0_BOB_DECLARE ( M0_INTERNAL  ,
m0_op_obj   
)

◆ M0_BOB_DECLARE() [3/4]

M0_BOB_DECLARE ( M0_INTERNAL  ,
m0_op   
)

◆ M0_BOB_DECLARE() [4/4]

M0_BOB_DECLARE ( M0_INTERNAL  ,
m0_ast_rc   
)

◆ m0_client_fop_to_file()

M0_INTERNAL struct m0_file* m0_client_fop_to_file ( struct m0_fop fop)

Definition at line 88 of file io_req_fop.c.

Here is the caller graph for this function:

◆ m0_client_global_fini()

M0_INTERNAL void m0_client_global_fini ( void  )

Definition at line 1460 of file client_init.c.

Here is the call graph for this function:

◆ m0_client_global_init()

M0_INTERNAL int m0_client_global_init ( void  )

global init/fini, used by motr/init.c

Definition at line 1495 of file client_init.c.

Here is the call graph for this function:

◆ m0_client_init_io_op()

M0_INTERNAL void m0_client_init_io_op ( void  )

Initialisation for object io operations. This initialises certain list types. This is heavily based on m0t1fs/linux_kernel/file.cio_bob_tlists_init

Definition at line 815 of file io.c.

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

◆ m0_confc()

M0_INTERNAL struct m0_confc* m0_confc ( struct m0_client m0c)

Gets the confc from client instance.

Parameters
m0cclient instance.
Returns
the confc used by this client instance.

Definition at line 315 of file client_init.c.

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

◆ m0_entity_init()

M0_INTERNAL void m0_entity_init ( struct m0_entity entity,
struct m0_realm parent,
const struct m0_uint128 id,
const enum m0_entity_type  type 
)

Initialises an entity.

Parameters
entityEntity to be initialised.
parentParent realm of the entity.
idIdentifier of the entity.
typeType of the entity.

-------------------------------------------------------------------------—*

Entity, Object and Index *

Definition at line 371 of file client.c.

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

◆ M0_HT_DECLARE()

M0_HT_DECLARE ( rm_ctx  ,
M0_INTERNAL  ,
struct m0_rm_lock_ctx  ,
struct m0_fid   
)

Methods for hash-table holding rm_ctx for RM locks

◆ m0_layout_mds_lookup()

M0_INTERNAL int m0_layout_mds_lookup ( struct m0_client m0c,
uint64_t  lid,
struct m0_client_layout **  l_out 
)

Reads the specified layout from the mds.

Parameters
m0cThe client instance we are working with, contains the layout db.
lidThe layout identifier to read.
l_outWhere to store the resultant layout.
Returns
0 for success, an error code otherwise.

◆ m0_obj_container_id_to_session()

M0_INTERNAL struct m0_rpc_session* m0_obj_container_id_to_session ( struct m0_pool_version pv,
uint64_t  container_id 
)

Retrieves the ios session corresponding to a container_id. The ioservice for an object is calculated from the container id.

Parameters
cinstclient instance.
container_idcontainer ID.
Returns
the session associated to the
Remarks
container_id == 0 is not valid.

Definition at line 925 of file cob.c.

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

◆ m0_op_alloc()

M0_INTERNAL int m0_op_alloc ( struct m0_op **  op,
size_t  op_size 
)

Allocates memory for an operation.

Remarks
For each m0_op the implementation maintains some additional data. Therefore, the amount of memory allocated by this function is typically greater than sizeof(struct m0_op)
Parameters
[out]opPointer to the allocated operation.
op_sizeSize of the operation to be allocated. Must be greater than sizeof(struct m0_op_common).
Returns
0 if the operation was correctly allocated or -ENOMEM if it not enough memory was available.

Definition at line 779 of file client.c.

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

◆ m0_op_executed()

M0_INTERNAL int m0_op_executed ( struct m0_op op)

----------------------------------------------------------------------——*

Operations *

This executes the optional user-provided callback. Called with the group lock held.

Parameters
machThe state machine which has changed to this state.
Returns
-1, stay in this state.

Definition at line 500 of file client.c.

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

◆ m0_op_failed()

M0_INTERNAL int m0_op_failed ( struct m0_op op)

Callback triggered by the state machine entering the 'FAILED' state. This in turn finds and executes the optional user-provided callback. Called with the group lock held.

Parameters
machThe state machine which has changed to this state.
Returns
-1, stay in this state.

Definition at line 548 of file client.c.

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

◆ m0_op_get()

M0_INTERNAL int m0_op_get ( struct m0_op **  op,
size_t  size 
)

Definition at line 568 of file client.c.

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

◆ m0_op_init()

M0_INTERNAL int m0_op_init ( struct m0_op op,
const struct m0_sm_conf conf,
struct m0_entity entity 
)

Initialises a client operation in its most generic form.

Parameters
opOperation being initialised.
confConfiguration for the operation state machine.
entityEntity the operation is targeted to.
Returns
0 if the operation succeeds. -EMGSIZE if the operation was pre-allocated with the wrong size. -ENOMEM if it was not possible to allocate memory for the operation.

Definition at line 806 of file client.c.

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

◆ m0_op_io_invariant()

M0_INTERNAL bool m0_op_io_invariant ( const struct m0_op_io iop)

Checks an object's IO operation is not malformed or corrupted.

Parameters
iopobject's IO operation to be checked.
Returns
true if the operation is not malformed or false if some error was detected.

Definition at line 161 of file io.c.

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

◆ m0_op_md_invariant()

bool m0_op_md_invariant ( const struct m0_op_md mop)

◆ m0_op_obj_ast_rc_invariant()

M0_INTERNAL bool m0_op_obj_ast_rc_invariant ( struct m0_ast_rc ar)

Checks the data struct holding the AST information is not malformed or corrupted.

Parameters
arThe pointer to AST information.
Returns
true if the operation is not malformed or false if some error was detected.

Definition at line 73 of file obj.c.

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

◆ m0_op_obj_invariant()

M0_INTERNAL bool m0_op_obj_invariant ( struct m0_op_obj oo)

Checks an object operation is not malformed or corrupted.

Parameters
ooobject operation to be checked.
Returns
true if the operation is not malformed or false if some error was detected.

Definition at line 79 of file obj.c.

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

◆ m0_op_stable()

M0_INTERNAL int m0_op_stable ( struct m0_op op)

This in turn finds and executes the optional user-provided callback. Called with the group lock held.

Parameters
machThe state machine which has changed to this state.
Returns
-1, stay in this state.

Definition at line 520 of file client.c.

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

◆ obj_fid_make_name()

M0_INTERNAL int obj_fid_make_name ( char *  name,
size_t  name_len,
const struct m0_fid fid 
)
Here is the caller graph for this function:

Variable Documentation

◆ ar_bobtype

const struct m0_bob_type ar_bobtype

Definition at line 73 of file client.c.

◆ cpus_sem

struct m0_semaphore cpus_sem

CPUs semaphore - to control CPUs usage by parity calcs.

Definition at line 45 of file io_req.c.

◆ entity_conf

struct m0_sm_conf entity_conf

Configuration structure for the client entity state machine.

Definition at line 213 of file client.c.

◆ M0_XCA_ENUM

enum m0_cob_req_states M0_XCA_ENUM

◆ oc_bobtype

const struct m0_bob_type oc_bobtype

Bob's for shared data structures in files

Bob definitions

Definition at line 44 of file client.c.

◆ oo_bobtype

const struct m0_bob_type oo_bobtype

Definition at line 45 of file client.c.

◆ op_bobtype

const struct m0_bob_type op_bobtype

Definition at line 46 of file client.c.