Motr  M0
io_foms.h
Go to the documentation of this file.
1 /* -*- C -*- */
2 /*
3  * Copyright (c) 2012-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_IOSERVICE_IO_FOMS_H__
26 #define __MOTR_IOSERVICE_IO_FOMS_H__
27 
135 #include "reqh/reqh.h" /* M0_FOPH_NR */
136 #include "fop/fop.h"
137 #include "ioservice/io_fops.h"
138 #include "stob/stob.h"
139 #include "net/net.h"
140 #include "fop/fom.h"
141 #include "stob/io.h" /* m0_stob_io */
142 #include "cob/cob.h" /* m0_cob */
143 
144 struct m0_fid;
145 struct m0_fop_file_fid;
146 struct m0_io_fom_cob_rw;
147 
155  uint64_t siod_magic;
166 };
167 
174  struct m0_fom fcrw_gen;
178  uint32_t fcrw_ndesc;
186  uint32_t fcrw_batch_size;
192  uint32_t fcrw_bshift;
194  uint64_t fcrw_cob_size;
195 
201 
209  struct m0_cob *fcrw_cob;
228  int fcrw_rc;
234  uint64_t fcrw_flags;
235 };
236 
251 };
252 
266  const char *fcrw_st_desc;
267 };
268 
272 M0_INTERNAL const char *m0_io_fom_cob_rw_service_name(struct m0_fom *fom);
273 
274 M0_INTERNAL int m0_io_cob_create(struct m0_cob_domain *cdom,
275  struct m0_fid *fid,
276  struct m0_fid *pver,
277  uint64_t lid,
278  struct m0_be_tx *tx);
284 M0_INTERNAL int m0_io_cob_stob_create(struct m0_fom *fom,
285  struct m0_cob_domain *ios_cdom,
286  struct m0_fid *fid,
287  struct m0_fid *pver,
288  uint64_t lid,
289  bool crow,
290  struct m0_cob **out);
291 
292 M0_INTERNAL uint64_t m0_io_size(struct m0_stob_io *sio, uint32_t bshift);
293 
296 #endif /* __MOTR_IOSERVICE_IO_FOMS_H__ */
297  /*
298  * Local variables:
299  * c-indentation-style: "K&R"
300  * c-basic-offset: 8
301  * tab-width: 8
302  * fill-column: 80
303  * scroll-step: 1
304  * End:
305  */
struct m0_fol_frag siod_fol_frag
Definition: io_foms.h:165
uint32_t fcrw_ndesc
Definition: io_foms.h:178
struct m0_tl fcrw_stio_list
Definition: io_foms.h:213
Definition: cob.h:581
struct m0_fom_callback siod_fcb
Definition: io_foms.h:160
struct m0_tl fcrw_netbuf_list
Definition: io_foms.h:223
uint64_t m0_time_t
Definition: time.h:37
uint64_t fcrw_flags
Definition: io_foms.h:234
int fcrw_curr_desc_index
Definition: io_foms.h:180
m0_bcount_t fcrw_count
Definition: io_foms.h:190
struct m0_stob_io_desc * fcrw_stio
Definition: io_foms.h:211
uint64_t m0_bcount_t
Definition: types.h:77
struct m0_rpc_bulk fcrw_bulk
Definition: io_foms.h:217
struct m0_net_buffer_pool * fcrw_bp
Definition: io_foms.h:205
m0_time_t fcrw_io_launch_time
Definition: io_foms.h:232
M0_INTERNAL int m0_io_cob_stob_create(struct m0_fom *fom, struct m0_cob_domain *cdom, struct m0_fid *fid, struct m0_fid *pver, uint64_t lid, bool crow, struct m0_cob **out)
Definition: io_foms.c:951
static struct m0_cob_domain * cdom
Definition: xform.c:55
uint64_t fcrw_cob_size
Definition: io_foms.h:194
m0_bcount_t fcrw_total_ioivec_cnt
Definition: io_foms.h:182
struct m0_fid fid
Definition: di.c:46
Definition: stob.h:163
M0_INTERNAL const char * m0_io_fom_cob_rw_service_name(struct m0_fom *fom)
Definition: io_foms.c:2493
struct m0_fid pver
Definition: idx_dix.c:74
Definition: tlist.h:251
Definition: dump.c:103
Definition: io.h:285
struct m0_fol_frag fcrw_fol_frag
Definition: io_foms.h:230
m0_bcount_t fcrw_curr_size
Definition: io_foms.h:184
int(* fcrw_st_state_function)(struct m0_fom *)
Definition: io_foms.h:260
Definition: fom.h:481
struct m0_stob_io fcrw_io
Definition: io_foms.h:200
struct m0_cob * fcrw_cob
Definition: io_foms.h:209
M0_INTERNAL uint64_t m0_io_size(struct m0_stob_io *sio, uint32_t bshift)
Definition: io_foms.c:1670
Definition: fid.h:38
struct m0_tlink siod_linkage
Definition: io_foms.h:159
m0_time_t fcrw_phase_start_time
Definition: io_foms.h:221
struct m0_fom fcrw_gen
Definition: io_foms.h:174
M0_INTERNAL int m0_io_cob_create(struct m0_cob_domain *cdom, struct m0_fid *fid, struct m0_fid *pver, uint64_t lid, struct m0_be_tx *tx)
Definition: io_foms.c:903
uint32_t fcrw_batch_size
Definition: io_foms.h:186
uint32_t fcrw_bshift
Definition: io_foms.h:192
uint64_t siod_magic
Definition: io_foms.h:155
m0_bcount_t fcrw_req_count
Definition: io_foms.h:188
m0_time_t fcrw_fom_start_time
Definition: io_foms.h:219
uint32_t fcrw_num_stobio_launched
Definition: io_foms.h:203
struct m0_pool_version * fcrw_pver
Definition: io_foms.h:176
#define out(...)
Definition: gen.c:41
m0_io_fom_cob_rw_phases
Definition: io_foms.h:241
struct m0_stob * fcrw_stob
Definition: io_foms.h:207
struct m0_tl fcrw_done_list
Definition: io_foms.h:215
Definition: tx.h:280
struct m0_stob_io siod_stob_io
Definition: io_foms.h:157