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 
34 /*
35  * A fsync fop is sent to a mdservice/ioservice instance to guarantee all the
36  * BE transactions up to certain point have been successfully committed.
37  *
38  * This code is not in md_fops.h because we need it to be reusable from the
39  * ioservice. The rest of fops in md_fops.h must remain isolated from ioservice.
40  */
41 
42 
46 struct m0_fop_fsync {
49 
51  uint32_t ff_fsync_mode;
52 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
53 
57 };
58 
64  int32_t ffr_rc;
65 
71 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
72 
73 
76 
77 extern const struct m0_fom_type_ops m0_fsync_fom_ops;
78 extern const struct m0_fop_type_ops m0_fsync_fop_ops;
79 
88 M0_INTERNAL int m0_mdservice_fsync_fop_init(struct m0_reqh_service_type * svct);
89 
94 M0_INTERNAL void m0_mdservice_fsync_fop_fini(void);
95 
96 #endif /* __MOTR_MDSERVICE_FSYNC_FOPS_H__ */
97 /*
98  * Local variables:
99  * c-indentation-style: "K&R"
100  * c-basic-offset: 8
101  * tab-width: 8
102  * fill-column: 80
103  * scroll-step: 1
104  * End:
105  */
int32_t ffr_rc
Definition: fsync_fops.h:64
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:70
enum m0_fsync_mode M0_XCA_DOMAIN
struct m0_be_tx_remid ff_be_remid
Definition: fsync_fops.h:48
m0_fsync_mode
Definition: fsync_fops.h:54
uint32_t ff_fsync_mode
Definition: fsync_fops.h:51
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