Motr  M0
fsync_fops.h
Go to the documentation of this file.
1 /* -*- C -*- */
2 /*
3  * Copyright (c) 2014-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_MDSERVICE_FSYNC_FOPS_H__
26 #define __MOTR_MDSERVICE_FSYNC_FOPS_H__
27 
28 #include "lib/types.h" /* uint32_t uin64_t ... */
29 #include "xcode/xcode_attr.h" /* M0_XCA_RECORD */
30 #include "fop/fom.h"
31 #include "be/tx.h"
32 #include "be/tx_xc.h"
33 #include "fop/wire.h"
34 #include "fop/wire_xc.h"
35 
36 /*
37  * A fsync fop is sent to a mdservice/ioservice instance to guarantee all the
38  * BE transactions up to certain point have been successfully committed.
39  *
40  * This code is not in md_fops.h because we need it to be reusable from the
41  * ioservice. The rest of fops in md_fops.h must remain isolated from ioservice.
42  */
43 
44 
48 struct m0_fop_fsync {
51 
53  uint32_t ff_fsync_mode;
54 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
55 
59 };
60 
66  int32_t ffr_rc;
67 
73 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
74 
75 
78 
79 extern const struct m0_fom_type_ops m0_fsync_fom_ops;
80 extern const struct m0_fop_type_ops m0_fsync_fop_ops;
81 
90 M0_INTERNAL int m0_mdservice_fsync_fop_init(struct m0_reqh_service_type * svct);
91 
96 M0_INTERNAL void m0_mdservice_fsync_fop_fini(void);
97 
98 #endif /* __MOTR_MDSERVICE_FSYNC_FOPS_H__ */
99 /*
100  * Local variables:
101  * c-indentation-style: "K&R"
102  * c-basic-offset: 8
103  * tab-width: 8
104  * fill-column: 80
105  * scroll-step: 1
106  * End:
107  */
int32_t ffr_rc
Definition: fsync_fops.h:66
struct m0_fop_type m0_fop_fsync_mds_fopt
Definition: fsync_fops.c:33
M0_INTERNAL int m0_mdservice_fsync_fop_init(struct m0_reqh_service_type *svct)
Definition: fsync_fops.c:113
const struct m0_fom_type_ops m0_fsync_fom_ops
Definition: fsync_fops.c:62
struct m0_be_tx_remid ffr_be_remid
Definition: fsync_fops.h:72
enum m0_fsync_mode M0_XCA_DOMAIN
struct m0_be_tx_remid ff_be_remid
Definition: fsync_fops.h:50
m0_fsync_mode
Definition: fsync_fops.h:56
uint32_t ff_fsync_mode
Definition: fsync_fops.h:53
struct m0_fop_type m0_fop_fsync_rep_fopt
Definition: fsync_fops.c:39
const struct m0_fop_type_ops m0_fsync_fop_ops
M0_INTERNAL void m0_mdservice_fsync_fop_fini(void)
Definition: fsync_fops.c:44