Motr  M0
process_fops.h
Go to the documentation of this file.
1 /* -*- C -*- */
2 /*
3  * Copyright (c) 2015-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_SSS_PROCESS_FOPS_H__
26 #define __MOTR_SSS_PROCESS_FOPS_H__
27 
28 #include "lib/types_xc.h"
29 #include "lib/buf_xc.h"
30 #include "fid/fid.h"
31 #include "fid/fid_xc.h"
32 
38 struct m0_ref;
39 struct m0_rpc_machine;
40 extern struct m0_fop_type m0_fop_process_fopt;
43 
57 };
58 
65  uint32_t ssp_cmd;
70  struct m0_fid ssp_id;
77  struct m0_buf ssp_param;
78 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
79 
86  int32_t sspr_rc;
90  int32_t sspr_health;
133  uint32_t sspr_kv_count;
134 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
135 
137  struct m0_fid ssps_fid;
138  /* real size set from ss_svc_list_running_fill */
139  char ssps_name[1];
140 };
141 
147  int32_t sspr_rc;
149 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
150 
151 M0_INTERNAL struct m0_fop *m0_ss_process_fop_create(struct m0_rpc_machine *mach,
152  uint32_t cmd,
153  const struct m0_fid *fid);
154 
155 M0_INTERNAL bool m0_ss_fop_is_process_req(const struct m0_fop *fop);
156 M0_INTERNAL struct m0_ss_process_req *m0_ss_fop_process_req(struct m0_fop *fop);
157 
158 M0_INTERNAL struct m0_ss_process_rep* m0_ss_fop_process_rep(struct m0_fop *fop);
159 
160 M0_INTERNAL struct m0_ss_process_svc_list_rep *
162 
163 M0_INTERNAL int m0_ss_process_fops_init(void);
164 M0_INTERNAL void m0_ss_process_fops_fini(void);
165 
166 M0_INTERNAL void m0_ss_process_stop_fop_release(struct m0_ref *ref);
167 
169 #endif /* __MOTR_SSS_PROCESS_FOPS_H__ */
170 
171 /*
172  * Local variables:
173  * c-indentation-style: "K&R"
174  * c-basic-offset: 8
175  * tab-width: 8
176  * fill-column: 80
177  * scroll-step: 1
178  * End:
179  */
struct m0_fid ssps_fid
Definition: process_fops.h:137
m0_bcount_t sspr_free_disk
Definition: process_fops.h:111
M0_INTERNAL bool m0_ss_fop_is_process_req(const struct m0_fop *fop)
Definition: process_fops.c:177
struct m0_buf ssp_param
Definition: process_fops.h:77
static struct m0_addb2_mach * mach
Definition: storage.c:42
uint64_t m0_bcount_t
Definition: types.h:77
M0_INTERNAL struct m0_ss_process_rep * m0_ss_fop_process_rep(struct m0_fop *fop)
Definition: process_fops.c:191
M0_INTERNAL struct m0_fop * m0_ss_process_fop_create(struct m0_rpc_machine *mach, uint32_t cmd, const struct m0_fid *fid)
Definition: process_fops.c:156
m0_ss_process_req_cmd
Definition: process_fops.h:48
M0_INTERNAL void m0_ss_process_fops_fini(void)
Definition: process_fops.c:102
m0_bcount_t sspr_free_seg
Definition: process_fops.h:98
struct m0_fop_type m0_fop_process_fopt
Definition: process_fops.c:42
struct m0_fid fid
Definition: di.c:46
Definition: buf.h:37
m0_bcount_t sspr_total_disk
Definition: process_fops.h:121
Definition: refs.h:34
uint32_t sspr_kv_count
Definition: process_fops.h:133
m0_bcount_t sspr_avail_disk
Definition: process_fops.h:116
struct m0_bufs sspr_services
Definition: process_fops.h:148
struct m0_fop_type m0_fop_process_rep_fopt
Definition: process_fops.c:43
struct m0_fop_type m0_fop_process_svc_list_rep_fopt
Definition: process_fops.c:44
M0_INTERNAL struct m0_ss_process_req * m0_ss_fop_process_req(struct m0_fop *fop)
Definition: process_fops.c:183
struct m0_fid ssp_id
Definition: process_fops.h:70
struct m0_buf sspr_bcrec
Definition: process_fops.h:129
M0_INTERNAL int m0_ss_process_fops_init(void)
Definition: process_fops.c:56
Definition: fid.h:38
struct m0_buf sspr_bckey
Definition: process_fops.h:125
static struct m0_fop * fop
Definition: item.c:57
Definition: buf.h:43
M0_INTERNAL void m0_ss_process_stop_fop_release(struct m0_ref *ref)
Definition: process_fops.c:137
struct m0_ss_process_svc_item M0_XCA_DOMAIN
M0_INTERNAL struct m0_ss_process_svc_list_rep * m0_ss_fop_process_svc_list_rep(struct m0_fop *fop)
Definition: process_fops.c:200
Definition: fop.h:79
m0_bcount_t sspr_total_seg
Definition: process_fops.h:106