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 
45 };
46 
51  char *sld_path;
54 };
55 
56 struct m0_stob_linux {
57  struct m0_stob sl_stob;
60  int sl_fd;
62  mode_t sl_mode;
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 *
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
86  const struct m0_fid *conf_sdev);
87 
92 M0_INTERNAL int
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  */
M0_INTERNAL int m0_stob_linux_reopen(struct m0_stob_id *stob_id, const char *f_path)
Definition: linux.c:554
struct m0_stob_linux_domain_cfg sld_cfg
Definition: linux.h:53
struct m0_stob sl_stob
Definition: linux.h:57
struct m0_fid sl_conf_sdev
Definition: linux.h:64
M0_INTERNAL struct m0_stob_linux * m0_stob_linux_container(struct m0_stob *stob)
Definition: linux.c:100
int sl_fd
Definition: linux.h:60
Definition: stob.h:163
static struct m0_stob * stob
Definition: storage.c:39
mode_t sl_mode
Definition: linux.h:62
static struct m0_stob_domain * dom
Definition: storage.c:38
M0_INTERNAL int m0_stob_linux_domain_fd_put(struct m0_stob_domain *dom, int fd)
Definition: linux.c:621
M0_INTERNAL int m0_stob_linux_domain_fd_get(struct m0_stob_domain *dom, int *fd)
Definition: linux.c:604
Definition: fid.h:38
M0_INTERNAL bool m0_stob_linux_domain_directio(struct m0_stob_domain *dom)
Definition: linux.c:628
struct m0_stob_domain sld_dom
Definition: linux.h:48
struct m0t1fs_filedata * fd
Definition: dir.c:1030
struct m0_fid_arr f_path
Definition: onwire.h:284
M0_INTERNAL struct m0_stob_linux_domain * m0_stob_linux_domain_container(struct m0_stob_domain *dom)
Definition: linux.c:106
M0_INTERNAL void m0_stob_linux_conf_sdev_associate(struct m0_stob *stob, const struct m0_fid *conf_sdev)
Definition: linux.c:594
struct m0_stob_ioq sld_ioq
Definition: linux.h:49
const struct m0_stob_type m0_stob_linux_type
Definition: linux.c:86
struct m0_stob_linux_domain * sl_dom
Definition: linux.h:58
char * sld_path
Definition: linux.h:51