Motr  M0
cob_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_COB_FOMS_H__
26 #define __MOTR_IOSERVICE_COB_FOMS_H__
27 
28 #include "cob/cob.h"
29 
30 /* import */
31 struct m0_storage_dev;
32 
44 };
45 
50 struct m0_fom_cob_op {
54  struct m0_fom fco_fom;
58  struct m0_fid fco_gfid;
60  struct m0_fid fco_cfid;
62  uint32_t fco_cob_idx;
65  struct m0_stob *fco_stob;
86  uint32_t fco_range_idx;
95  uint64_t fco_flags;
96 };
97 
98 M0_INTERNAL int m0_cob_fom_create(struct m0_fop *fop, struct m0_fom **out,
99  struct m0_reqh *reqh);
100 
104 M0_INTERNAL int m0_cc_cob_setup(struct m0_fom_cob_op *cc,
105  struct m0_cob_domain *cdom,
106  const struct m0_cob_attr *attr,
107  struct m0_be_tx *ctx);
108 
109 M0_INTERNAL int m0_cc_stob_cr_credit(struct m0_stob_id *sid,
110  struct m0_be_tx_credit *accum);
111 
112 M0_INTERNAL int m0_cc_stob_create(struct m0_fom *fom, struct m0_stob_id *sid);
113 
114 M0_INTERNAL int m0_cc_cob_nskey_make(struct m0_cob_nskey **nskey,
115  const struct m0_fid *gfid,
116  uint32_t cob_idx);
117 
118 M0_INTERNAL size_t m0_cob_io_fom_locality(const struct m0_fid *fid);
119 
120 #endif /* __MOTR_IOSERVICE_COB_FOMS_H__ */
121 
122 /*
123  * Local variables:
124  * c-indentation-style: "K&R"
125  * c-basic-offset: 8
126  * tab-width: 8
127  * fill-column: 80
128  * scroll-step: 1
129  * End:
130  */
static struct ctx cc
M0_INTERNAL int m0_cc_stob_cr_credit(struct m0_stob_id *sid, struct m0_be_tx_credit *accum)
Definition: cob_foms.c:807
bool fco_recreate
Definition: cob_foms.h:68
M0_INTERNAL int m0_cc_cob_nskey_make(struct m0_cob_nskey **nskey, const struct m0_fid *gfid, uint32_t cob_idx)
Definition: cob_foms.c:846
uint64_t fco_flags
Definition: cob_foms.h:95
M0_INTERNAL int m0_cc_cob_setup(struct m0_fom_cob_op *cc, struct m0_cob_domain *cdom, const struct m0_cob_attr *attr, struct m0_be_tx *ctx)
Definition: cob_foms.c:1033
enum m0_cob_type fco_cob_type
Definition: cob_foms.h:64
m0_fom_cob_operations_phases
Definition: cob_foms.h:36
uint32_t fco_cob_idx
Definition: cob_foms.h:62
static struct m0_cob_domain * cdom
Definition: xform.c:55
m0_cob_op
Definition: cob.h:1068
struct m0_fid fco_gfid
Definition: cob_foms.h:58
struct m0_indexvec fco_range
Definition: cob_foms.h:75
struct m0_stob * fco_stob
Definition: cob_foms.h:65
struct m0_fid fid
Definition: di.c:46
bool fco_is_done
Definition: cob_foms.h:66
struct m0_fom fco_fom
Definition: cob_foms.h:54
static void attr(struct m0_addb2__context *ctx, const uint64_t *v, char *buf)
Definition: dump.c:949
M0_INTERNAL int m0_cc_stob_create(struct m0_fom *fom, struct m0_stob_id *sid)
Definition: cob_foms.c:824
Definition: stob.h:163
Definition: reqh.h:94
Definition: dump.c:103
M0_INTERNAL int m0_cob_fom_create(struct m0_fop *fop, struct m0_fom **out, struct m0_reqh *reqh)
Definition: cob_foms.c:183
struct m0_indexvec fco_want
Definition: cob_foms.h:81
struct m0_pool_version * fco_pver
Definition: cob_foms.h:56
Definition: fom.h:481
struct m0_reqh reqh
Definition: rm_foms.c:48
Definition: fid.h:38
struct m0_stob_id fco_stob_id
Definition: cob_foms.h:52
struct m0_indexvec fco_got
Definition: cob_foms.h:91
uint32_t fco_range_idx
Definition: cob_foms.h:86
static struct m0_fop * fop
Definition: item.c:57
m0_cob_type
Definition: cob.h:1124
struct m0_fol_frag fco_fol_frag
Definition: cob_foms.h:93
enum m0_cob_op fco_fop_type
Definition: cob_foms.h:67
Definition: nucleus.c:42
#define out(...)
Definition: gen.c:41
M0_INTERNAL size_t m0_cob_io_fom_locality(const struct m0_fid *fid)
Definition: cob_foms.c:271
struct m0_fid gfid
Definition: dir.c:626
Definition: fop.h:79
Definition: tx.h:280
struct m0_fid fco_cfid
Definition: cob_foms.h:60