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/fop.h"
35 #include "xcode/xcode_attr.h"
36 
78 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
79 
82 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
83 
85  struct m0_buf cr_opaque;
86 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
87 
88 struct m0_rm_fop_req {
89  /* Could either be debtor or creditor */
92  uint64_t rrq_policy;
93  uint64_t rrq_flags;
94  /* Next three fields determine request reserve priority.
95  * @see m0_rm_incoming, m0_rm_reserve_prio
96  */
99  uint64_t rrq_orig_seq;
100 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
101 
106 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
107 
109  int32_t br_rc;
112  struct m0_buf br_lvb;
120 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
121 
125 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
126 
128  int32_t rr_rc;
136 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
137 
141 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
142 
146 extern struct m0_fop_type m0_rm_fop_borrow_fopt;
148 extern struct m0_fop_type m0_rm_fop_revoke_fopt;
150 extern struct m0_fop_type m0_rm_fop_cancel_fopt;
152 
156 M0_INTERNAL int m0_rm_fop_init(void);
157 M0_INTERNAL void m0_rm_fop_fini(void);
158 
161 /* __MOTR_RM_FOPS_H__ */
162 #endif
163 
struct m0_rm_fop_credit br_credit
Definition: rm_fops.h:111
struct m0_rm_fop_loan fc_loan
Definition: rm_fops.h:139
struct m0_uint128 bo_group_id
Definition: rm_fops.h:105
uint64_t rrq_orig_seq
Definition: rm_fops.h:99
m0_time_t rrq_orig_time
Definition: rm_fops.h:98
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:90
struct m0_rm_fop_req fr_base
Definition: rm_fops.h:123
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:112
uint64_t rrq_flags
Definition: rm_fops.h:93
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:91
struct m0_cookie br_creditor_cookie
Definition: rm_fops.h:119
struct m0_cookie lo_cookie
Definition: rm_fops.h:81
struct m0_rm_fop_req bo_base
Definition: rm_fops.h:103
Definition: buf.h:37
struct m0_fid rrq_orig_owner
Definition: rm_fops.h:97
struct m0_buf cr_opaque
Definition: rm_fops.h:85
struct m0_cookie ow_cookie
Definition: rm_fops.h:76
struct m0_rm_fop_loan fr_loan
Definition: rm_fops.h:124
struct m0_rm_fop_owner bo_creditor
Definition: rm_fops.h:104
struct m0_cookie rr_debtor_cookie
Definition: rm_fops.h:135
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:140
struct m0_rm_fop_loan br_loan
Definition: rm_fops.h:110
struct m0_buf ow_resource
Definition: rm_fops.h:77
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:92
M0_INTERNAL void m0_rm_fop_fini(void)
Definition: rm_fops.c:547