Motr  M0
device_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_DEVICE_FOPS_H__
26 #define __MOTR_SSS_DEVICE_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 #include "rpc/rpc_machine.h"
33 
120 extern struct m0_fop_type m0_sss_fop_device_fopt;
122 
150 };
151 
164  uint32_t ssd_cmd;
168  struct m0_fid ssd_fid;
169 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
170 
178  int32_t ssdp_rc;
183  uint32_t ssdp_ha_state;
184 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
185 
186 
187 M0_INTERNAL struct m0_fop *m0_sss_device_fop_create(struct m0_rpc_machine *mach,
188  uint32_t cmd,
189  const struct m0_fid *fid);
190 
191 M0_INTERNAL bool m0_sss_fop_is_dev_req(const struct m0_fop *fop);
192 
193 M0_INTERNAL struct m0_sss_device_fop *m0_sss_fop_to_dev_req(struct m0_fop *fop);
194 
195 M0_INTERNAL bool m0_sss_fop_is_dev_rep(const struct m0_fop *fop);
196 
197 M0_INTERNAL
199 
200 M0_INTERNAL int m0_sss_device_fops_init(void);
201 
202 M0_INTERNAL void m0_sss_device_fops_fini(void);
203 
206 #endif /* __MOTR_SSS_DEVICE_FOPS_H__ */
207 
208 /*
209  * Local variables:
210  * c-indentation-style: "K&R"
211  * c-basic-offset: 8
212  * tab-width: 8
213  * fill-column: 80
214  * scroll-step: 1
215  * End:
216  */
struct m0_fop_type m0_sss_fop_device_rep_fopt
Definition: device_fops.c:40
M0_INTERNAL struct m0_fop * m0_sss_device_fop_create(struct m0_rpc_machine *mach, uint32_t cmd, const struct m0_fid *fid)
Definition: device_fops.c:86
M0_INTERNAL void m0_sss_device_fops_fini(void)
Definition: device_fops.c:80
struct m0_fop_type m0_sss_fop_device_fopt
Definition: device_fops.c:39
static struct m0_addb2_mach * mach
Definition: storage.c:42
M0_INTERNAL struct m0_sss_device_fop * m0_sss_fop_to_dev_req(struct m0_fop *fop)
Definition: device_fops.c:114
struct m0_fid fid
Definition: di.c:46
M0_INTERNAL bool m0_sss_fop_is_dev_req(const struct m0_fop *fop)
Definition: device_fops.c:108
struct m0_fid ssd_fid
Definition: device_fops.h:168
m0_sss_device_req_cmd
Definition: device_fops.h:128
M0_INTERNAL struct m0_sss_device_fop_rep * m0_sss_fop_to_dev_rep(struct m0_fop *fop)
Definition: device_fops.c:129
M0_INTERNAL int m0_sss_device_fops_init(void)
Definition: device_fops.c:46
Definition: fid.h:38
struct m0_sss_device_fop M0_XCA_DOMAIN(rpc)
static struct m0_fop * fop
Definition: item.c:57
M0_INTERNAL bool m0_sss_fop_is_dev_rep(const struct m0_fop *fop)
Definition: device_fops.c:122
Definition: fop.h:79