Motr  M0
cmd_internal.h
Go to the documentation of this file.
1 /* -*- C -*- */
2 /*
3  * Copyright (c) 2015-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_SPIEL_CMD_INTERNAL_H__
26 #define __MOTR_SPIEL_CMD_INTERNAL_H__
27 
33 #define SPIEL_CONF_OBJ_FIND(confc, fid, conf_obj, filter, ...) \
34  _spiel_conf_obj_find(confc, fid, filter, \
35  M0_COUNT_PARAMS(__VA_ARGS__) + 1, \
36  (const struct m0_fid []){ \
37  __VA_ARGS__, M0_FID0 }, \
38  conf_obj)
39 
40 #define SPIEL_CONF_DIR_ITERATE(confc, ctx, iter_cb, ...) \
41  _spiel_conf_dir_iterate(confc, ctx, iter_cb, \
42  M0_COUNT_PARAMS(__VA_ARGS__) + 1, \
43  (const struct m0_fid []){ \
44  __VA_ARGS__, M0_FID0 })
45 
46 enum {
48  SPIEL_CONN_TIMEOUT = 5, /* seconds */
49 };
50 
51 #define SPIEL_DEVICE_FORMAT_TIMEOUT m0_time_from_now(10*60, 0)
52 
54  char *sse_string;
56  uint64_t sse_magic;
57 };
58 
59 /****************************************************/
60 /* Filesystem */
61 /****************************************************/
62 
64 struct _fs_stats_ctx {
70  int fx_rc;
71  struct m0_spiel_core *fx_spc;
72  uint32_t fx_svc_total;
73  uint32_t fx_svc_processed;
74  uint32_t fx_svc_replied;
80  struct m0_tl fx_items;
82  const struct m0_conf_obj_type *fx_type;
83  struct m0_mutex fx_guard;
86 };
87 
88 #define SPIEL_LOGLVL M0_DEBUG
89 
91 #endif /* __MOTR_SPIEL_CMD_INTERNAL_H__*/
92 
93 /*
94  * Local variables:
95  * c-indentation-style: "K&R"
96  * c-basic-offset: 8
97  * tab-width: 8
98  * fill-column: 80
99  * scroll-step: 1
100  * End:
101  */
m0_bcount_t fx_total_disk
Definition: cmd_internal.h:79
Definition: cmd_internal.h:53
struct m0_tlink sse_link
Definition: cmd_internal.h:55
char * sse_string
Definition: cmd_internal.h:54
uint32_t fx_svc_processed
Definition: cmd_internal.h:73
uint64_t m0_bcount_t
Definition: types.h:77
struct m0_tl fx_items
Definition: cmd_internal.h:80
struct m0_mutex fx_guard
Definition: cmd_internal.h:83
m0_bcount_t fx_free_seg
Definition: cmd_internal.h:75
m0_bcount_t fx_avail_disk
Definition: cmd_internal.h:78
uint32_t fx_svc_replied
Definition: cmd_internal.h:74
Definition: tlist.h:251
struct m0_semaphore fx_barrier
Definition: cmd_internal.h:85
uint32_t fx_svc_total
Definition: cmd_internal.h:72
m0_bcount_t fx_free_disk
Definition: cmd_internal.h:77
struct m0_spiel_core * fx_spc
Definition: cmd_internal.h:71
const struct m0_conf_obj_type * fx_type
Definition: cmd_internal.h:82
Definition: mutex.h:47
m0_bcount_t fx_total_seg
Definition: cmd_internal.h:76
uint64_t sse_magic
Definition: cmd_internal.h:56