Motr  M0
client_internal.h
Go to the documentation of this file.
1 /* -*- C -*- */
2 /*
3  * Copyright (c) 2016-2021 Seagate Technology LLC and/or its Affiliates
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  * For any questions about this software or licensing,
18  * please email opensource@seagate.com or cortx-questions@seagate.com.
19  *
20  */
21 
22 
23 #pragma once
24 
25 #ifndef __MOTR_CLIENT_INTERNAL_H__
26 #define __MOTR_CLIENT_INTERNAL_H__
27 
28 #ifdef __KERNEL__
29 #define M0_CLIENT_THREAD_ENTER M0_THREAD_ENTER
30 #else
31 #define M0_CLIENT_THREAD_ENTER
32 #endif
33 
34 #define OP_OBJ2CODE(op_obj) op_obj->oo_oc.oc_op.op_code
35 
36 #define OP_IDX2CODE(op_idx) op_idx->oi_oc.oc_op.op_code
37 
38 #define MOCK
39 #define CLIENT_FOR_M0T1FS
40 
41 #include "module/instance.h"
42 #include "motr/init.h"
43 
44 #include "ioservice/io_fops.h" /* m0_io_fop_{init,fini,release} */
45 #include "conf/schema.h" /* m0_conf_service_type */
46 #include "conf/confc.h" /* m0_confc */
47 #include "layout/pdclust.h" /* struct m0_pdclust_attr */
48 #include "pool/pool.h" /* struct m0_pool */
49 #include "reqh/reqh.h" /* struct m0_reqh */
50 #include "rm/rm.h" /* stuct m0_rm_owner */
51 #include "rm/rm_rwlock.h" /* enum m0_rm_rwlock_req_type */
52 #include "lib/refs.h"
53 #include "lib/hash.h"
54 #include "file/file.h" /* struct m0_file */
55 #include "motr/ha.h" /* m0_motr_ha */
56 #include "addb2/identifier.h"
57 
59 #include "be/ut/helper.h" /* struct m0_be_ut_backend */
60 
61 #include "motr/client.h" /* m0_* */
62 #include "motr/idx.h" /* m0_idx_* */
63 #include "motr/pg.h" /* nwxfer and friends */
64 #include "motr/sync.h" /* sync_request */
65 #include "fop/fop.h"
66 #include "dtm0/domain.h" /* m0_dtm0_domain */
67 
68 struct m0_idx_service_ctx;
69 struct m0_dtm0_service;
70 struct m0_dtx;
71 
72 #ifdef CLIENT_FOR_M0T1FS
73 
78 #define MOTR_MDCOB_LOOKUP_SKIP 3
79 
83 enum {
85 };
86 #endif
87 
90 enum {
92 };
93 
102 };
103 
125 };
126 
127 M0_INTERNAL bool entity_invariant_full(struct m0_entity *ent);
128 M0_INTERNAL bool entity_invariant_locked(const struct m0_entity *ent);
129 
130 void m0_op_fini(struct m0_op *op);
131 
132 struct m0_ast_rc {
134  int ar_rc;
135  uint64_t ar_magic;
136 
137 };
138 
139 /*
140  * Client has a number of nested structures, all of which are passed to the
141  * application as a 'struct m0_op'. The application may in fact
142  * allocate some of these structures, without knowing what they are, or how
143  * big they should be. 'struct m0_op' is always the first member, and
144  * contains all the fields the application is permitted to change.
145  *
146  * A 'struct m0_op' is always contained in a
147  * 'struct m0_op_common'. This contains the fields that are common to
148  * all operations, namely the launch/executed/finalise callbacks. The
149  * application is not permitted to change (or even see) these.
150  *
151  * Operations then have a different 'super type' depending on whether they are
152  * operating on an object, index or realm.
153  *
154  * Object operations always have a 'struct m0_op_obj', this represents
155  * the namespace/metadata aspects of the object, such as its layout. Operations
156  * such as create/delete will use this struct as the root 'type' of their work,
157  * as they don't need IO buffers etc.
158  *
159  * 'struct m0_op_io' is the last (and biggest/highest) type, it contains
160  * the databuf and paritybuf arrays for reading/writing object data.
161  *
162  * +---m0_op_common-----------+
163  * | |
164  * | +-m0_op--------+ |
165  * | | | |
166  * | +--------------+ |
167  * | |
168  * +--------------------------+
169  *
170  * \/_ _\/
171  *
172  * +m0_op_io---------------+ +m0_op_idx--------------+
173  * | +m0_op_obj---------+ | | |
174  * | | | | | [m0_op_common] |
175  * | | [m0_op_common] | | | |
176  * | | | | +-----------------------+
177  * | +------------------+ |
178  * | |
179  * +-----------------------+
180  *
181  * +m0_op_md---------------+ +m0_op_sync-------------+
182  * | | | |
183  * | [m0_op_common] | | [m0_op_common] |
184  * | | | |
185  * +-----------------------+ +-----------------------+
186  *
187  */
188 struct m0_op_common {
189  struct m0_op oc_op;
190  uint64_t oc_magic;
191 
192 #ifdef MOCK
193  /* Timer used to move sm between states*/
195 #endif
196 
197  void (*oc_cb_launch)(struct m0_op_common *oc);
198  void (*oc_cb_replied)(struct m0_op_common *oc);
199  void (*oc_cb_cancel)(struct m0_op_common *oc);
200  void (*oc_cb_fini)(struct m0_op_common *oc);
201  void (*oc_cb_free)(struct m0_op_common *oc);
202 
203  /* Callback operations for states*/
204  void (*oc_cb_executed)(void *args);
205  void (*oc_cb_stable)(void *args);
206  void (*oc_cb_failed)(void *args);
207 };
208 
212 struct m0_op_idx {
214  uint64_t oi_magic;
215 
216  struct m0_idx *oi_idx;
217 
218  /* K-V pairs */
221 
222  /* Hold per key-value query return code. */
223  int32_t *oi_rcs;
224 
225  /* Number of queries sent to index*/
226  int32_t oi_nr_queries;
228 
230  struct m0_ast_rc oi_ar;
231 
232  /* A bit-mask of m0_op_idx_flags. */
233  uint32_t oi_flags;
234 
241 
243  struct m0_dtx *oi_dtx;
244 };
245 
249 struct m0_op_obj {
251  uint64_t oo_magic;
252 
254  struct m0_ast_rc oo_ar;
255 
256  struct m0_fid oo_fid;
257 #ifdef CLIENT_FOR_M0T1FS
258  struct m0_fid oo_pfid;
259  struct m0_buf oo_name;
260 #endif
261  struct m0_fid oo_pver; /* cob pool version */
263 
264  /* MDS fop */
266 };
267 
271 struct m0_op_io {
273  uint64_t ioo_magic;
274 
275  struct m0_obj *ioo_obj;
276 
279 
285 
286  uint64_t ioo_attr_mask;
288  uint32_t ioo_flags;
290  struct m0_fid ioo_pver;
291 
293  int32_t ioo_rc;
294 
301 
303  uint64_t ioo_iomap_nr;
304 
309 
311  struct m0_sm ioo_sm;
312 
314  const struct m0_op_io_ops *ioo_ops;
315 
321 
324 
334 
342 
347  uint64_t *ioo_failed_nodes;
348 
353  uint32_t ioo_dgmap_nr;
355 
360  uint64_t ioo_copied_nr;
361 
363  uint64_t ioo_map_idx;
364 
367 
373 
376 
379 
385 
391 };
392 
393 struct m0_io_args {
394  struct m0_obj *ia_obj;
399  uint64_t ia_mask;
400  uint32_t ia_flags;
401 };
402 
403 struct m0_op_md {
408 };
409 
410 bool m0_op_md_invariant(const struct m0_op_md *mop);
411 
413  struct m0_op_io io;
414  struct m0_op_md md;
415 };
416 
420 struct m0_op_sync {
422  uint64_t os_magic;
423 
425  struct m0_ast_rc os_ar;
426 
428 
437  int32_t os_mode;
438 };
439 
447 } M0_XCA_ENUM;
448 
453  struct m0_op_obj *icr_oo;
454  uint32_t icr_index;
456  uint64_t icr_magic;
457 };
458 
460  int (*lo_alloc) (struct m0_client_layout **);
461  int (*lo_get) (struct m0_client_layout *);
462  void (*lo_put) (struct m0_client_layout *);
464  int (*lo_io_build)(struct m0_io_args *io_args, struct m0_op **op);
465 };
466 
468 enum {
469  /* 4K, typical linux/intel page size */
470 #ifdef CONFIG_X86_64
471  M0_DEFAULT_BUF_SHIFT = 12,
472 #elif defined (CONFIG_AARCH64)
473  M0_DEFAULT_BUF_SHIFT = 16,
474 #else
475 #error "The platform is not supported"
476 #endif
477  /* 512, typical disk sector */
479 
480  /* RPC */
481  M0_RPC_TIMEOUT = 60, /* Seconds */
486 
489 
492 
493  /*
494  * These constants are used to create buffers acceptable to the
495  * network code.
496  */
497 
498 #ifdef CONFIG_X86_64
499  M0_NETBUF_MASK = 4096 - 1,
500  M0_NETBUF_SHIFT = 12,
501 #elif defined (CONFIG_AARCH64)
502  M0_NETBUF_MASK = 65536 - 1,
503  M0_NETBUF_SHIFT = 16,
504 #else
505 #error "The platform is not supported"
506 #endif
507 };
508 
513  SHUTDOWN = -1,
514  STARTUP = 1,
515 };
516 
525 struct m0_client {
526  uint64_t m0c_magic;
527 
529  struct m0 *m0c_motr;
530 
533 
536 
540 
543 
550 
553 
555 
558 
565 
568 
573 
583 
585  /* Also required for confc to connect! */
587 
590 
593 
594 #ifdef CLIENT_FOR_M0T1FS
595 
597 
600 #endif
601 
602  char *m0c_laddr;
607 
610 
621 
622 #ifdef MOCK
624 #endif
625 
627 
629 
631 };
632 
634 extern struct m0_semaphore cpus_sem;
635 
651  struct m0_fid rmc_key;
658  struct m0_ref rmc_ref;
663  uint64_t rmc_magic;
665  uint64_t rmc_gen;
666 };
667 
669 M0_HT_DECLARE(rm_ctx, M0_INTERNAL, struct m0_rm_lock_ctx, struct m0_fid);
670 
679  int32_t rlr_rc;
681 };
682 
692 M0_INTERNAL int m0_obj_lock_get(struct m0_obj *obj,
693  struct m0_rm_lock_req *req,
694  struct m0_clink *clink,
695  enum m0_rm_rwlock_req_type rw_type);
696 
701 M0_INTERNAL int m0_obj_lock_get_sync(struct m0_obj *obj,
702  struct m0_rm_lock_req *req,
703  enum m0_rm_rwlock_req_type rw_type);
704 
708 extern const struct m0_bob_type oc_bobtype;
709 extern const struct m0_bob_type oo_bobtype;
710 extern const struct m0_bob_type op_bobtype;
711 extern const struct m0_bob_type ar_bobtype;
712 
713 M0_BOB_DECLARE(M0_INTERNAL, m0_op_common);
714 M0_BOB_DECLARE(M0_INTERNAL, m0_op_obj);
715 M0_BOB_DECLARE(M0_INTERNAL, m0_op);
716 M0_BOB_DECLARE(M0_INTERNAL, m0_ast_rc);
717 
719 M0_INTERNAL int m0_client_global_init(void);
720 M0_INTERNAL void m0_client_global_fini(void);
721 
728 M0_INTERNAL struct m0_confc* m0_confc(struct m0_client *m0c);
729 
730 M0_INTERNAL int m0_op_executed(struct m0_op *op);
731 M0_INTERNAL int m0_op_stable(struct m0_op *op);
732 M0_INTERNAL int m0_op_failed(struct m0_op *op);
733 M0_INTERNAL int m0_op_get(struct m0_op **op, size_t size);
734 
741 M0_INTERNAL struct m0_client *
742 m0__entity_instance(const struct m0_entity *entity);
743 
750 M0_INTERNAL struct m0_client *
751 m0__op_instance(const struct m0_op *op);
752 
756 M0_INTERNAL struct m0_op *
757 m0__ioo_to_op(struct m0_op_io *ioo);
758 
765 M0_INTERNAL struct m0_client *
766 m0__obj_instance(const struct m0_obj *obj);
767 
774 M0_INTERNAL struct m0_client*
775 m0__oo_instance(struct m0_op_obj *oo);
776 
780 M0_INTERNAL bool m0__is_oostore(struct m0_client *instance);
781 
782 /* sm conf that needs registering by m0_client_init */
783 extern struct m0_sm_conf m0_op_conf;
784 extern struct m0_sm_conf entity_conf;
785 
786 /* used by the entity code to create operations */
787 M0_INTERNAL int m0_op_alloc(struct m0_op **op, size_t op_size);
788 
789 M0_INTERNAL int m0_op_init(struct m0_op *op,
790  const struct m0_sm_conf *conf,
791  struct m0_entity *entity);
792 
793 /* XXX juan: add doxygen */
794 M0_INTERNAL void m0_client_init_io_op(void);
795 
804 M0_INTERNAL bool m0_op_obj_ast_rc_invariant(struct m0_ast_rc *ar);
805 
813 M0_INTERNAL bool m0_op_obj_invariant(struct m0_op_obj *oo);
814 
822 M0_INTERNAL bool m0_op_io_invariant(const struct m0_op_io *iop);
823 
833 M0_INTERNAL struct m0_rpc_session *
835  uint64_t container_id);
836 
843 M0_INTERNAL struct m0_locality *
845 
852 M0_INTERNAL bool
854 
862 M0_INTERNAL int m0__obj_namei_send(struct m0_op_obj *oo);
863 
870 M0_INTERNAL int m0__obj_namei_cancel(struct m0_op *op);
871 
878 M0_INTERNAL int m0__idx_cancel(struct m0_op_idx *oi);
879 
886 M0_INTERNAL int m0__obj_attr_get_sync(struct m0_obj *obj);
887 
896 M0_INTERNAL int m0_layout_mds_lookup(struct m0_client *m0c,
897  uint64_t lid,
898  struct m0_client_layout **l_out);
899 
908 M0_INTERNAL void m0_entity_init(struct m0_entity *entity,
909  struct m0_realm *parent,
910  const struct m0_uint128 *id,
911  const enum m0_entity_type type);
919 M0_INTERNAL int
921  struct m0_pool_version **pv);
922 
929 M0_INTERNAL uint64_t
930 m0__obj_layout_id_get(struct m0_op_obj *oo);
931 
942 M0_INTERNAL int
944  const uint64_t layout_id,
945  const struct m0_fid *fid,
946  struct m0_layout_instance **linst);
947 
955 M0_INTERNAL int m0__cob_poolversion_get(struct m0_obj *obj);
956 
957 M0_INTERNAL int obj_fid_make_name(char *name, size_t name_len,
958  const struct m0_fid *fid);
962 M0_INTERNAL struct m0_obj*
963 m0__obj_entity(struct m0_entity *entity);
964 M0_INTERNAL uint64_t m0__obj_lid(struct m0_obj *obj);
965 M0_INTERNAL enum m0_client_layout_type
967 M0_INTERNAL struct m0_fid m0__obj_pver(struct m0_obj *obj);
968 M0_INTERNAL void m0__obj_attr_set(struct m0_obj *obj,
969  struct m0_fid pver,
970  uint64_t lid);
971 M0_INTERNAL bool
973 M0_INTERNAL bool m0__obj_is_parity_verify_mode(struct m0_client *instance);
974 M0_INTERNAL bool m0__obj_is_di_enabled(struct m0_op_io *ioo);
975 M0_INTERNAL bool m0__obj_is_cksum_validation_allowed(struct m0_op_io *ioo);
976 M0_INTERNAL int m0__obj_io_build(struct m0_io_args *args,
977  struct m0_op **op);
978 M0_INTERNAL void m0__obj_op_done(struct m0_op *op);
979 
980 M0_INTERNAL bool m0__is_read_op(struct m0_op *op);
981 M0_INTERNAL bool m0__is_update_op(struct m0_op *op);
982 
983 M0_INTERNAL int m0__io_ref_get(struct m0_client *m0c);
984 M0_INTERNAL void m0__io_ref_put(struct m0_client *m0c);
985 M0_INTERNAL struct m0_file *m0_client_fop_to_file(struct m0_fop *fop);
986 M0_INTERNAL bool entity_id_is_valid(const struct m0_uint128 *id);
987 
994 M0_INTERNAL struct m0_client *
995 m0__idx_instance(const struct m0_idx *idx);
996 
999 #endif /* __MOTR_CLIENT_INTERNAL_H__ */
1000 
1001 /*
1002  * Local variables:
1003  * c-indentation-style: "K&R"
1004  * c-basic-offset: 8
1005  * tab-width: 8
1006  * fill-column: 80
1007  * scroll-step: 1
1008  * End:
1009  */
1010 /*
1011  * vim: tabstop=8 shiftwidth=8 noexpandtab textwidth=80 nowrap
1012  */
struct m0_file ioo_flock
struct m0_mutex rlr_mutex
int32_t os_mode
sns_repair_state
Definition: pool.h:568
struct m0_sm_group * os_sm_grp
struct m0_fid m0c_root_fid
m0__entity_states
struct m0_dtx * oi_dtx
M0_INTERNAL bool m0__is_oostore(struct m0_client *instance)
Definition: client.c:255
uint64_t ioo_copied_nr
struct m0_htable m0c_mock_entities
struct m0_bufvec mdo_key
bool m0c_astthread_active
struct m0_fid m0c_profile_fid
Definition: dtm.h:554
int32_t oi_nr_queries
Definition: client.h:835
struct m0_bufvec * ia_data
Definition: client.h:788
M0_INTERNAL struct m0_rpc_session * m0_obj_container_id_to_session(struct m0_pool_version *pv, uint64_t container_id)
Definition: cob.c:925
struct m0_htable m0c_rm_ctxs
uint64_t ar_magic
M0_INTERNAL bool m0__obj_is_di_enabled(struct m0_op_io *ioo)
Definition: io.c:660
uint64_t * ioo_failed_nodes
M0_INTERNAL int m0_layout_mds_lookup(struct m0_client *m0c, uint64_t lid, struct m0_client_layout **l_out)
struct m0_buf oo_name
M0_INTERNAL struct m0_op * m0__ioo_to_op(struct m0_op_io *ioo)
Definition: client.c:249
Definition: sm.h:350
void m0_op_fini(struct m0_op *op)
Definition: client.c:847
M0_INTERNAL struct m0_fid m0__obj_pver(struct m0_obj *obj)
Definition: obj.c:163
static struct io_request req
Definition: file.c:100
struct m0_pool_version * pv
Definition: dir.c:629
struct m0_op_common mdo_oc
struct dix_req * oi_dix_req
const struct m0_op_io_ops * ioo_ops
M0_INTERNAL int m0__cob_poolversion_get(struct m0_obj *obj)
struct m0_bufvec mdo_chk
struct m0_chan m0c_io_wait
struct m0_sm_group * oo_sm_grp
struct m0_clink m0c_conf_ready
initlift_direction
M0_INTERNAL int obj_fid_make_name(char *name, size_t name_len, const struct m0_fid *fid)
struct m0_net_buffer_pool m0c_buffer_pool
M0_INTERNAL int m0_op_get(struct m0_op **op, size_t size)
Definition: client.c:568
struct m0_clink m0c_conf_exp
static struct m0_clovis * m0c
Definition: main.c:25
uint64_t ioo_attr_mask
enum m0_obj_opcode ia_opcode
struct m0_op oc_op
struct m0_sm_group m0c_sm_group
uint64_t oc_magic
struct m0_rm_remote rmc_creditor
struct m0_sm_timer oc_sm_timer
Definition: conf.py:1
struct sync_request * os_req
struct m0_reqh_service_ctx * m0c_ha_rsctx
bool ioo_rect_needed
struct m0_ast_rc oo_ar
M0_INTERNAL int m0__obj_pool_version_get(struct m0_obj *obj, struct m0_pool_version **pv)
Definition: obj.c:346
Definition: sm.h:504
int(* lo_io_build)(struct m0_io_args *io_args, struct m0_op **op)
Definition: ub.c:49
struct m0_op_common oi_oc
M0_INTERNAL bool m0__is_update_op(struct m0_op *op)
Definition: utils.c:290
struct m0_bufvec * oi_keys
M0_INTERNAL int m0__obj_namei_send(struct m0_op_obj *oo)
Definition: cob.c:1804
M0_INTERNAL int m0_op_executed(struct m0_op *op)
Definition: client.c:500
static struct foo * obj
Definition: tlist.c:302
int ioo_addb2_mapped
M0_INTERNAL int m0__obj_attr_get_sync(struct m0_obj *obj)
Definition: cob.c:1974
M0_INTERNAL uint64_t m0__obj_lid(struct m0_obj *obj)
Definition: obj.c:126
struct m0_rm_owner rmc_owner
struct m0_sm ioo_sm
M0_INTERNAL bool m0__obj_pool_version_is_valid(const struct m0_obj *obj)
Definition: obj.c:169
m0_cob_req_states
M0_INTERNAL struct m0_client * m0__entity_instance(const struct m0_entity *entity)
Definition: client.c:226
struct m0_fid fid
Definition: di.c:46
uint32_t oi_flags
op
Definition: libdemo.c:64
M0_INTERNAL struct m0_obj * m0__obj_entity(struct m0_entity *entity)
Definition: obj.c:51
struct m0_fid oo_pver
struct m0_chan rlr_chan
Definition: buf.h:37
struct m0_net_domain m0c_ndom
M0_INTERNAL int m0__obj_namei_cancel(struct m0_op *op)
Definition: cob.c:1915
M0_INTERNAL int m0__io_ref_get(struct m0_client *m0c)
Definition: client_init.c:868
struct m0_semaphore cpus_sem
Definition: io_req.c:45
M0_INTERNAL struct m0_file * m0_client_fop_to_file(struct m0_fop *fop)
Definition: io_req_fop.c:88
m0_rm_rwlock_req_type
Definition: rm_rwlock.h:104
uint64_t * ioo_failed_session
struct m0_ref rmc_ref
struct m0_bufvec mdo_val
bool ioo_dgmode_io_sent
struct m0_rm_incoming rlr_in
M0_INTERNAL bool m0_op_obj_invariant(struct m0_op_obj *oo)
Definition: obj.c:79
def args
Definition: addb2db.py:716
M0_INTERNAL bool m0__obj_is_parity_verify_mode(struct m0_client *instance)
Definition: io.c:655
struct m0_pools_common m0c_pools_common
Definition: client.h:641
struct nw_xfer_request ioo_nwxfer
M0_INTERNAL bool entity_id_is_valid(const struct m0_uint128 *id)
Definition: client.c:354
Definition: rmut.h:123
struct m0_ast_rc icr_ar
void(* oc_cb_free)(struct m0_op_common *oc)
struct m0_idx_service_ctx m0c_idx_svc_ctx
struct m0_op_obj ioo_oo
struct m0_chan m0c_conf_ready_chan
M0_INTERNAL uint64_t m0__obj_layout_id_get(struct m0_op_obj *oo)
Definition: obj.c:384
M0_INTERNAL bool m0__obj_poolversion_is_valid(const struct m0_obj *obj)
struct m0_chan ioo_completion
struct m0_idx * oi_idx
const char * name
Definition: trace.c:110
enum sns_repair_state ioo_sns_state
const struct m0_bob_type op_bobtype
Definition: client.c:46
struct m0_indexvec ioo_ext
Definition: refs.h:34
struct m0_motr_ha m0c_motr_ha
M0_HT_DECLARE(rm_ctx, M0_INTERNAL, struct m0_rm_lock_ctx, struct m0_fid)
struct m0_ast_rc os_ar
M0_INTERNAL struct m0_confc * m0_confc(struct m0_client *m0c)
Definition: client_init.c:315
M0_INTERNAL struct m0_client * m0__oo_instance(struct m0_op_obj *oo)
Definition: obj.c:43
struct m0_fid ioo_pver
M0_INTERNAL void m0__io_ref_put(struct m0_client *m0c)
Definition: client_init.c:897
struct m0_indexvec * ia_ext
uint32_t ioo_dgmap_nr
struct m0_bufvec * ia_attr
const struct m0_bob_type ar_bobtype
Definition: client.c:73
struct m0_fid pver
Definition: idx_dix.c:74
M0_INTERNAL enum m0_client_layout_type m0__obj_layout_type(struct m0_obj *obj)
Definition: obj.c:139
struct m0_reqh m0c_reqh
struct m0_bufvec ioo_data
struct m0_sm_ast ioo_done_ast
M0_INTERNAL int m0_op_alloc(struct m0_op **op, size_t op_size)
Definition: client.c:779
struct m0_obj * ioo_obj
uint64_t ioo_rmw_read_pages
Definition: instance.h:80
int layout_id
Definition: dir.c:331
enum m0_pbuf_type ioo_pbuf_type
struct m0_fid oo_pfid
struct m0_rw_lockable rmc_rw_file
struct m0_ast_rc oi_ar
M0_INTERNAL int m0__idx_cancel(struct m0_op_idx *oi)
Definition: idx_dix.c:1235
uint64_t os_magic
uint32_t ioo_flags
struct m0_fid oo_fid
Definition: xcode.c:55
Definition: reqh.h:94
struct m0_sm_ast ioo_ast
int(* lo_alloc)(struct m0_client_layout **)
Definition: chan.h:229
M0_INTERNAL int m0_op_init(struct m0_op *op, const struct m0_sm_conf *conf, struct m0_entity *entity)
Definition: client.c:806
void(* oc_cb_fini)(struct m0_op_common *oc)
int32_t * oi_rcs
uint64_t ioo_map_idx
M0_INTERNAL bool m0__is_read_op(struct m0_op *op)
Definition: utils.c:296
struct m0_confc_update_state m0c_confc_state
struct m0_hlink rmc_hlink
struct m0_sm_conf entity_conf
Definition: client.c:213
struct m0_op_obj * icr_oo
static struct m0_clink clink[RDWR_REQUEST_MAX]
struct m0_op_common oo_oc
struct m0_fid rmc_key
M0_BOB_DECLARE(M0_INTERNAL, m0_op_common)
void(* lo_put)(struct m0_client_layout *)
void(* oc_cb_stable)(void *args)
struct m0_fid m0c_process_fid
M0_INTERNAL int m0_client_global_init(void)
Definition: client_init.c:1495
uint64_t ioo_magic
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)
Definition: obj_lock.c:214
bool oi_in_completion
int32_t ioo_rc
static struct m0_client cinst
Definition: sync.c:84
struct m0_sm_ast ar_ast
Definition: ha.h:54
M0_INTERNAL void m0__obj_attr_set(struct m0_obj *obj, struct m0_fid pver, uint64_t lid)
Definition: obj.c:151
struct m0_clink m0c_conf_ready_async
char * m0c_laddr
struct m0_sm_group * oi_sm_grp
struct m0_ref m0c_ongoing_io
void(* oc_cb_executed)(void *args)
struct m0_net_xprt * m0c_xprt
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)
Definition: client.c:371
M0_INTERNAL bool m0_op_obj_ast_rc_invariant(struct m0_ast_rc *ar)
Definition: obj.c:73
Definition: fid.h:38
M0_INTERNAL struct m0_client * m0__idx_instance(const struct m0_idx *idx)
Definition: client.c:269
m0_entity_type
Definition: client.h:585
uint64_t ia_mask
M0_INTERNAL struct m0_client * m0__obj_instance(const struct m0_obj *obj)
Definition: client.c:261
M0_INTERNAL bool m0__obj_is_cksum_validation_allowed(struct m0_op_io *ioo)
Definition: io.c:665
struct m0_bufvec * oi_vals
struct m0_dtm0_domain m0c_dtm0_domain
M0_INTERNAL struct m0_client * m0__op_instance(const struct m0_op *op)
Definition: client.c:236
void(* oc_cb_cancel)(struct m0_op_common *oc)
struct m0_thread m0c_astthread
struct m0_sm_ast oi_ast
Definition: sm.h:301
struct m0_htable * rmc_htable
M0_INTERNAL void m0__obj_op_done(struct m0_op *op)
Definition: io.c:691
enum initlift_direction m0c_initlift_direction
m0_bcount_t size
Definition: di.c:39
m0_obj_opcode
Definition: client.h:537
struct m0_rpc_machine m0c_rpc_machine
static struct m0_fop * fop
Definition: item.c:57
struct m0_op_io io
m0_client_layout_type
Definition: client.h:776
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)
Definition: obj_lock.c:191
static struct m0 instance
Definition: main.c:78
M0_INTERNAL int m0_op_stable(struct m0_op *op)
Definition: client.c:520
M0_INTERNAL bool entity_invariant_locked(const struct m0_entity *ent)
Definition: client.c:320
enum m0_cob_req_states M0_XCA_ENUM
uint64_t ioo_iomap_nr
struct m0_fop * oo_mds_fop
M0_INTERNAL int m0__obj_io_build(struct m0_io_args *args, struct m0_op **op)
Definition: io.c:677
#define M0_MKTIME(secs, ns)
Definition: time.h:86
M0_INTERNAL int m0_op_failed(struct m0_op *op)
Definition: client.c:548
void(* oc_cb_failed)(void *args)
void(* oc_cb_replied)(struct m0_op_common *oc)
uint64_t oo_magic
M0_INTERNAL struct m0_locality * m0__locality_pick(struct m0_client *cinst)
Definition: client.c:290
struct m0_op_md md
M0_INTERNAL void m0_client_init_io_op(void)
Definition: io.c:815
Definition: file.h:81
int type
Definition: dir.c:1031
struct m0_layout_instance * oo_layout_instance
int(* lo_get)(struct m0_client_layout *)
struct m0_dirent * ent
Definition: dir.c:1029
const struct m0_bob_type oo_bobtype
Definition: client.c:45
void(* oc_cb_launch)(struct m0_op_common *oc)
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)
Definition: obj.c:403
Definition: mutex.h:47
const struct m0_bob_type oc_bobtype
Definition: client.c:44
struct m0_fid rmc_own_fid
struct m0_clink ioo_clink
struct m0_bufvec ioo_attr
uint32_t ia_flags
struct m0_sm m0c_initlift_sm
struct m0_atomic64 m0c_pending_io_nr
struct m0_sm_conf m0_op_conf
Definition: client.c:145
Definition: fop.h:79
bool m0_op_md_invariant(const struct m0_op_md *mop)
struct pargrp_iomap ** ioo_iomaps
M0_INTERNAL bool entity_invariant_full(struct m0_entity *ent)
Definition: client.c:300
Definition: vec.h:145
uint64_t m0c_magic
m0_pbuf_type
uint64_t oi_magic
M0_INTERNAL bool m0_op_io_invariant(const struct m0_op_io *iop)
Definition: io.c:161
M0_INTERNAL void m0_client_global_fini(void)
Definition: client_init.c:1460
struct m0_obj * ia_obj
struct m0_dtm0_service * m0c_dtms
struct m0_config * m0c_config
struct m0 * m0c_motr
struct m0_op_common os_oc