Motr  M0
trigger_fop.h
Go to the documentation of this file.
1 /* -*- C -*- */
2 /*
3  * Copyright (c) 2016-2020 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_CM_REPREB_TRIGGER_FOP_H__
26 #define __MOTR_CM_REPREB_TRIGGER_FOP_H__
27 
33 #include "lib/types.h"
34 #include "xcode/xcode_attr.h"
35 #include "rpc/rpc_opcodes.h" /* M0_RPC_OPCODES */
36 
37 struct m0_fom_type_ops;
38 struct m0_cm_type;
39 struct m0_fop_type;
40 struct m0_xcode_type;
41 
42 struct failure_data {
43  uint32_t fd_nr;
44  uint64_t *fd_index;
45 } M0_XCA_SEQUENCE M0_XCA_DOMAIN(rpc);
46 
51 struct trigger_fop {
52  uint32_t op;
53 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
54 
56  int32_t rc;
57 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
58 
60  int32_t ssr_rc;
61  uint32_t ssr_state;
62  uint64_t ssr_progress;
63 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
64 
65 
67 M0_INTERNAL void m0_cm_trigger_fop_init(struct m0_fop_type *ft,
68  enum M0_RPC_OPCODES op,
69  const char *name,
70  const struct m0_xcode_type *xt,
71  uint64_t rpc_flags,
72  struct m0_cm_type *cmt,
73  const struct m0_fom_type_ops *ops);
74 
76 M0_INTERNAL void m0_cm_trigger_fop_fini(struct m0_fop_type *ft);
77 
79 #endif /* __MOTR_CM_REPREB_TRIGGER_FOP_H__ */
80 
81 /*
82  * Local variables:
83  * c-indentation-style: "K&R"
84  * c-basic-offset: 8
85  * tab-width: 8
86  * fill-column: 80
87  * scroll-step: 1
88  * End:
89  */
90 /*
91  * vim: tabstop=8 shiftwidth=8 noexpandtab textwidth=80 nowrap
92  */
M0_RPC_OPCODES
Definition: rpc_opcodes.h:41
uint64_t * fd_index
Definition: trigger_fop.h:44
static struct m0_xcode_type ** xt[]
Definition: protocol.c:64
uint32_t op
Definition: trigger_fop.h:52
uint64_t ssr_progress
Definition: trigger_fop.h:62
op
Definition: libdemo.c:64
const char * name
Definition: trace.c:110
M0_INTERNAL void m0_cm_trigger_fop_fini(struct m0_fop_type *ft)
Definition: trigger_fom.c:353
uint32_t fd_nr
Definition: trigger_fop.h:43
Definition: cm.h:143
uint32_t ssr_state
Definition: trigger_fop.h:61
struct failure_data M0_XCA_DOMAIN(rpc)
static struct m0_fop_type * ft[]
Definition: service_ut.c:856
M0_INTERNAL void m0_cm_trigger_fop_init(struct m0_fop_type *ft, enum M0_RPC_OPCODES op, const char *name, const struct m0_xcode_type *xt, uint64_t rpc_flags, struct m0_cm_type *cmt, const struct m0_fom_type_ops *ops)
Definition: trigger_fom.c:358
struct m0_fom_ops ops
Definition: io_foms.c:623