Motr  M0
rm_fops.h
Go to the documentation of this file.
1 /* -*- C -*- */
2 /*
3  * Copyright (c) 2013-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_RM_FOPS_H__
26 #define __MOTR_RM_FOPS_H__
27 
28 #include "lib/buf.h"
29 #include "lib/buf_xc.h"
30 #include "lib/cookie.h"
31 #include "lib/cookie_xc.h"
32 
33 #include "fop/fom_generic.h"
34 #include "fop/fom_generic_xc.h"
35 #include "fop/fop.h"
36 #include "xcode/xcode_attr.h"
37 
79 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
80 
83 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
84 
86  struct m0_buf cr_opaque;
87 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
88 
89 struct m0_rm_fop_req {
90  /* Could either be debtor or creditor */
93  uint64_t rrq_policy;
94  uint64_t rrq_flags;
95  /* Next three fields determine request reserve priority.
96  * @see m0_rm_incoming, m0_rm_reserve_prio
97  */
100  uint64_t rrq_orig_seq;
101 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
102 
107 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
108 
110  int32_t br_rc;
113  struct m0_buf br_lvb;
121 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
122 
126 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
127 
129  int32_t rr_rc;
137 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
138 
142 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
143 
147 extern struct m0_fop_type m0_rm_fop_borrow_fopt;
149 extern struct m0_fop_type m0_rm_fop_revoke_fopt;
151 extern struct m0_fop_type m0_rm_fop_cancel_fopt;
153 
157 M0_INTERNAL int m0_rm_fop_init(void);
158 M0_INTERNAL void m0_rm_fop_fini(void);
159 
162 /* __MOTR_RM_FOPS_H__ */
163 #endif
164 
struct m0_rm_fop_credit br_credit
Definition: rm_fops.h:112
struct m0_rm_fop_loan fc_loan
Definition: rm_fops.h:140
struct m0_uint128 bo_group_id
Definition: rm_fops.h:106
uint64_t rrq_orig_seq
Definition: rm_fops.h:100
m0_time_t rrq_orig_time
Definition: rm_fops.h:99
struct m0_fop_type m0_fop_generic_reply_fopt
Definition: fom_generic.c:50
struct m0_rm_fop_owner rrq_owner
Definition: rm_fops.h:91
struct m0_rm_fop_req fr_base
Definition: rm_fops.h:124
struct m0_rm_fop_owner M0_XCA_DOMAIN(rpc)
uint64_t m0_time_t
Definition: time.h:37
struct m0_buf br_lvb
Definition: rm_fops.h:113
uint64_t rrq_flags
Definition: rm_fops.h:94
struct m0_fop_type m0_rm_fop_borrow_rep_fopt
Definition: rm_fops.c:68
struct m0_rm_fop_credit rrq_credit
Definition: rm_fops.h:92
struct m0_cookie br_creditor_cookie
Definition: rm_fops.h:120
struct m0_cookie lo_cookie
Definition: rm_fops.h:82
struct m0_rm_fop_req bo_base
Definition: rm_fops.h:104
Definition: buf.h:37
struct m0_fid rrq_orig_owner
Definition: rm_fops.h:98
struct m0_buf cr_opaque
Definition: rm_fops.h:86
struct m0_cookie ow_cookie
Definition: rm_fops.h:77
struct m0_rm_fop_loan fr_loan
Definition: rm_fops.h:125
struct m0_rm_fop_owner bo_creditor
Definition: rm_fops.h:105
struct m0_cookie rr_debtor_cookie
Definition: rm_fops.h:136
M0_INTERNAL int m0_rm_fop_init(void)
Definition: rm_fops.c:561
Definition: fid.h:38
struct m0_cookie fc_creditor_cookie
Definition: rm_fops.h:141
struct m0_rm_fop_loan br_loan
Definition: rm_fops.h:111
struct m0_buf ow_resource
Definition: rm_fops.h:78
struct m0_fop_type m0_rm_fop_cancel_fopt
Definition: rm_fops.c:81
struct m0_fop_type m0_rm_fop_revoke_fopt
Definition: rm_fops.c:75
struct m0_fop_type m0_rm_fop_borrow_fopt
Definition: rm_fops.c:67
struct m0_fop_type m0_rm_fop_revoke_rep_fopt
Definition: rm_fops.c:76
uint64_t rrq_policy
Definition: rm_fops.h:93
M0_INTERNAL void m0_rm_fop_fini(void)
Definition: rm_fops.c:547