Motr  M0
fop.h
Go to the documentation of this file.
1 /* -*- C -*- */
2 /*
3  * Copyright (c) 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_DTM0_FOP_H__
26 #define __MOTR_DTM0_FOP_H__
27 
28 #include "fop/fop.h" /* m0_fop_type */
29 #include "fop/fom.h" /* m0_fom */
30 #include "xcode/xcode_attr.h" /* M0_XCA attrs */
31 #include "dtm0/tx_desc.h" /* m0_dtm0_tx_desc */
32 #include "dtm0/tx_desc_xc.h" /* m0_dtm0_tx_desc_xc */
33 
34 struct m0_be_tx;
35 struct m0_buf;
36 struct m0_be_dtm0_log;
37 
38 extern struct m0_fop_type dtm0_req_fop_fopt;
39 extern struct m0_fop_type dtm0_rep_fop_fopt;
40 extern struct m0_fop_type dtm0_redo_fop_fopt;
41 
42 M0_INTERNAL int m0_dtm0_fop_init(void);
43 M0_INTERNAL void m0_dtm0_fop_fini(void);
44 
51 } M0_XCA_ENUM;
52 
54 struct dtm0_req_fop {
55  uint32_t dtr_msg M0_XCA_FENUM(m0_dtm0s_msg);
58 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
59 
60 struct dtm0_rep_fop {
62  int32_t dr_rc;
65 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
66 
67 M0_INTERNAL int m0_dtm0_on_committed(struct m0_fom *fom,
68  const struct m0_dtm0_tid *id);
69 
70 M0_INTERNAL int m0_dtm0_logrec_update(struct m0_be_dtm0_log *log,
71  struct m0_be_tx *tx,
72  struct m0_dtm0_tx_desc *txd,
73  struct m0_buf *payload);
74 #endif /* __MOTR_DTM0_FOP_H__ */
75 
76 /*
77  * Local variables:
78  * c-indentation-style: "K&R"
79  * c-basic-offset: 8
80  * tab-width: 8
81  * fill-column: 80
82  * scroll-step: 1
83  * End:
84  */
struct m0_buf dtr_payload
Definition: fop.h:57
Definition: fop.h:50
uint32_t dtr_msg M0_XCA_FENUM(m0_dtm0s_msg)
enum m0_dtm0s_msg M0_XCA_ENUM
struct m0_fop_type dtm0_req_fop_fopt
Definition: fop.c:42
struct m0_fop_type dtm0_redo_fop_fopt
Definition: fop.c:44
struct m0_fop_type dtm0_rep_fop_fopt
Definition: fop.c:43
M0_INTERNAL int m0_dtm0_logrec_update(struct m0_be_dtm0_log *log, struct m0_be_tx *tx, struct m0_dtm0_tx_desc *txd, struct m0_buf *payload)
Definition: fop.c:284
m0_dtm0s_msg
Definition: fop.h:45
Definition: buf.h:37
struct m0_dtm0_tx_desc dr_txr
Definition: fop.h:64
M0_INTERNAL int m0_dtm0_fop_init(void)
Definition: fop.c:166
Definition: dump.c:103
Definition: fom.h:481
struct dtm0_req_fop M0_XCA_DOMAIN(rpc)
Definition: fop.h:46
M0_INTERNAL int m0_dtm0_on_committed(struct m0_fom *fom, const struct m0_dtm0_tid *id)
Definition: fop.c:300
M0_INTERNAL void m0_dtm0_fop_fini(void)
Definition: fop.c:100
struct m0_dtm0_tx_desc dtr_txr
Definition: fop.h:56
int32_t dr_rc
Definition: fop.h:62
const uint64_t payload[]
Definition: base.c:65
Definition: tx.h:280