Motr  M0
stats_fops.h
Go to the documentation of this file.
1 /* -*- C -*- */
2 /*
3  * Copyright (c) 2013-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_STATS_STATS_FOPS_H__
26 #define __MOTR_STATS_STATS_FOPS_H__
27 
28 #include "lib/types.h"
29 #include "xcode/xcode_attr.h"
30 
36 struct m0_fop;
37 struct m0_ref;
38 
42 
43 /* @note Same fop definations will be defined from monitoring infra
44  * Need to merge these changes properly.
45  * Please remove tis note after merge.
46  */
47 
48 struct m0_uint64_seq {
49  uint32_t se_nr;
51  uint64_t *se_data;
52 } M0_XCA_SEQUENCE M0_XCA_DOMAIN(rpc);
53 
57 struct m0_stats_sum {
58  uint32_t ss_id;
61 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
62 
63 struct m0_stats_recs {
65  uint64_t sf_nr;
68 } M0_XCA_SEQUENCE M0_XCA_DOMAIN(rpc);
69 
73 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
74 
79 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
80 
83  int32_t sqrf_rc;
85 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
86 
92 M0_INTERNAL struct m0_stats_update_fop *
94 
100 M0_INTERNAL struct m0_stats_query_fop *
102 
108 M0_INTERNAL struct m0_stats_query_rep_fop *
110 
114 M0_INTERNAL void m0_stats_query_fop_release(struct m0_ref *ref);
115 
116 M0_INTERNAL int m0_stats_fops_init(void);
117 M0_INTERNAL void m0_stats_fops_fini(void);
118 
120 #endif /* __MOTR_STATS_STATS_FOPS_H_ */
121 /*
122  * Local variables:
123  * c-indentation-style: "K&R"
124  * c-basic-offset: 8
125  * tab-width: 8
126  * fill-column: 80
127  * scroll-step: 1
128  * End:
129  */
uint32_t ss_id
Definition: stats_fops.h:58
M0_INTERNAL void m0_stats_fops_fini(void)
Definition: stats_fops.c:94
struct m0_uint64_seq ss_data
Definition: stats_fops.h:60
struct m0_stats_recs sqrf_stats
Definition: stats_fops.h:84
uint64_t * se_data
Definition: stats_fops.h:51
struct m0_uint64_seq sqf_ids
Definition: stats_fops.h:78
Definition: refs.h:34
struct m0_stats_sum * sf_stats
Definition: stats_fops.h:67
M0_INTERNAL struct m0_stats_query_rep_fop * m0_stats_query_rep_fop_get(struct m0_fop *fop)
Definition: stats_fops.c:114
struct m0_fop_type m0_fop_stats_update_fopt
Definition: stats_fops.c:41
uint32_t se_nr
Definition: stats_fops.h:49
M0_INTERNAL struct m0_stats_query_fop * m0_stats_query_fop_get(struct m0_fop *fop)
Definition: stats_fops.c:108
struct m0_stats_recs suf_stats
Definition: stats_fops.h:72
M0_INTERNAL int m0_stats_fops_init(void)
Definition: stats_fops.c:56
uint64_t sf_nr
Definition: stats_fops.h:65
static struct m0_fop * fop
Definition: item.c:57
struct m0_fop_type m0_fop_stats_query_fopt
Definition: stats_fops.c:42
M0_INTERNAL void m0_stats_query_fop_release(struct m0_ref *ref)
Definition: stats_fops.c:119
struct m0_uint64_seq M0_XCA_DOMAIN(rpc)
M0_INTERNAL struct m0_stats_update_fop * m0_stats_update_fop_get(struct m0_fop *fop)
Definition: stats_fops.c:102
Definition: fop.h:79
struct m0_fop_type m0_fop_stats_query_rep_fopt
Definition: stats_fops.c:43