Motr
M0
linux.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_STOB_LINUX_H__
26
#define __MOTR_STOB_LINUX_H__
27
28
#include "
sm/sm.h
"
/* m0_sm_ast */
29
#include "
stob/stob.h
"
/* m0_stob_type */
30
#include "
stob/domain.h
"
/* m0_stob_domain */
31
#include "
stob/ioq.h
"
/* m0_stob_ioq */
32
41
struct
m0_stob_linux_domain_cfg
{
42
mode_t
sldc_file_mode
;
43
int
sldc_file_flags
;
44
bool
sldc_use_directio
;
45
};
46
47
struct
m0_stob_linux_domain
{
48
struct
m0_stob_domain
sld_dom
;
49
struct
m0_stob_ioq
sld_ioq
;
51
char
*
sld_path
;
53
struct
m0_stob_linux_domain_cfg
sld_cfg
;
54
};
55
56
struct
m0_stob_linux
{
57
struct
m0_stob
sl_stob
;
58
struct
m0_stob_linux_domain
*
sl_dom
;
60
int
sl_fd
;
62
mode_t
sl_mode
;
64
struct
m0_fid
sl_conf_sdev
;
65
};
66
67
M0_INTERNAL
struct
m0_stob_linux
*
m0_stob_linux_container
(
struct
m0_stob
*
stob
);
68
M0_INTERNAL
struct
m0_stob_linux_domain
*
69
m0_stob_linux_domain_container
(
struct
m0_stob_domain
*
dom
);
70
77
M0_INTERNAL
int
m0_stob_linux_reopen
(
struct
m0_stob_id
*stob_id,
78
const
char
*
f_path
);
79
84
M0_INTERNAL
void
85
m0_stob_linux_conf_sdev_associate
(
struct
m0_stob
*
stob
,
86
const
struct
m0_fid
*conf_sdev);
87
92
M0_INTERNAL
int
93
m0_stob_linux_domain_fd_get
(
struct
m0_stob_domain
*
dom
,
int
*
fd
);
94
96
M0_INTERNAL
int
m0_stob_linux_domain_fd_put
(
struct
m0_stob_domain
*
dom
,
int
fd
);
97
98
M0_INTERNAL
bool
m0_stob_linux_domain_directio
(
struct
m0_stob_domain
*
dom
);
99
100
extern
const
struct
m0_stob_type
m0_stob_linux_type
;
101
103
#endif
/* __MOTR_STOB_LINUX_H__ */
104
105
/*
106
* Local variables:
107
* c-indentation-style: "K&R"
108
* c-basic-offset: 8
109
* tab-width: 8
110
* fill-column: 80
111
* scroll-step: 1
112
* End:
113
*/
sm.h
domain.h
ioq.h
m0_stob_linux_domain_cfg::sldc_use_directio
bool sldc_use_directio
Definition:
linux.h:44
m0_stob_linux
Definition:
linux.h:56
m0_stob_linux_reopen
M0_INTERNAL int m0_stob_linux_reopen(struct m0_stob_id *stob_id, const char *f_path)
Definition:
linux.c:554
m0_stob_linux_domain::sld_cfg
struct m0_stob_linux_domain_cfg sld_cfg
Definition:
linux.h:53
m0_stob_linux::sl_stob
struct m0_stob sl_stob
Definition:
linux.h:57
m0_stob_linux::sl_conf_sdev
struct m0_fid sl_conf_sdev
Definition:
linux.h:64
m0_stob_linux_container
M0_INTERNAL struct m0_stob_linux * m0_stob_linux_container(struct m0_stob *stob)
Definition:
linux.c:100
m0_stob_linux::sl_fd
int sl_fd
Definition:
linux.h:60
m0_stob
Definition:
stob.h:163
m0_stob_id
Definition:
stob.h:101
stob
static struct m0_stob * stob
Definition:
storage.c:39
m0_stob_linux::sl_mode
mode_t sl_mode
Definition:
linux.h:62
dom
static struct m0_stob_domain * dom
Definition:
storage.c:38
m0_stob_linux_domain_cfg::sldc_file_flags
int sldc_file_flags
Definition:
linux.h:43
m0_stob_type
Definition:
type.h:59
m0_stob_linux_domain_fd_put
M0_INTERNAL int m0_stob_linux_domain_fd_put(struct m0_stob_domain *dom, int fd)
Definition:
linux.c:621
m0_stob_linux_domain_fd_get
M0_INTERNAL int m0_stob_linux_domain_fd_get(struct m0_stob_domain *dom, int *fd)
Definition:
linux.c:604
m0_stob_linux_domain_cfg
Definition:
linux.h:41
m0_fid
Definition:
fid.h:38
m0_stob_domain
Definition:
domain.h:93
m0_stob_linux_domain
Definition:
linux.h:47
m0_stob_linux_domain_directio
M0_INTERNAL bool m0_stob_linux_domain_directio(struct m0_stob_domain *dom)
Definition:
linux.c:628
m0_stob_linux_domain::sld_dom
struct m0_stob_domain sld_dom
Definition:
linux.h:48
fd
struct m0t1fs_filedata * fd
Definition:
dir.c:1030
m0_stob_ioq
Definition:
ioq.h:60
f_path
struct m0_fid_arr f_path
Definition:
onwire.h:284
stob.h
m0_stob_linux_domain_container
M0_INTERNAL struct m0_stob_linux_domain * m0_stob_linux_domain_container(struct m0_stob_domain *dom)
Definition:
linux.c:106
m0_stob_linux_conf_sdev_associate
M0_INTERNAL void m0_stob_linux_conf_sdev_associate(struct m0_stob *stob, const struct m0_fid *conf_sdev)
Definition:
linux.c:594
m0_stob_linux_domain::sld_ioq
struct m0_stob_ioq sld_ioq
Definition:
linux.h:49
m0_stob_linux_type
const struct m0_stob_type m0_stob_linux_type
Definition:
linux.c:86
m0_stob_linux_domain_cfg::sldc_file_mode
mode_t sldc_file_mode
Definition:
linux.h:42
m0_stob_linux::sl_dom
struct m0_stob_linux_domain * sl_dom
Definition:
linux.h:58
m0_stob_linux_domain::sld_path
char * sld_path
Definition:
linux.h:51
stob
linux.h
Generated on Thu Apr 14 2022 14:03:00 for Motr by
1.8.14