Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/*
Copyright 2018-2019, Barcelona Supercomputing Center (BSC), Spain
Copyright 2015-2019, Johannes Gutenberg Universitaet Mainz, Germany
This software was partially supported by the
EC H2020 funded project NEXTGenIO (Project ID: 671951, www.nextgenio.eu).
This software was partially supported by the
ADA-FS project under the SPPEXA project funded by the DFG.
SPDX-License-Identifier: MIT
*/
#ifndef GEKKOFS_GKFS_FUNCTIONS_HPP
#define GEKKOFS_GKFS_FUNCTIONS_HPP
#include <client/open_file_map.hpp>
#include <global/metadata.hpp>
std::shared_ptr<Metadata> gkfs_metadata(const std::string& path, bool follow_links = false);
int check_parent_dir(const std::string& path);
int gkfs_open(const std::string& path, mode_t mode, int flags);
int gkfs_mk_node(const std::string& path, mode_t mode);
int gkfs_rm_node(const std::string& path);
int gkfs_access(const std::string& path, int mask, bool follow_links = true);
int gkfs_stat(const std::string& path, struct stat* buf, bool follow_links = true);
int gkfs_statvfs(struct statvfs* buf);
int gkfs_statfs(struct statfs* buf);
off64_t gkfs_lseek(unsigned int fd, off64_t offset, unsigned int whence);
off64_t gkfs_lseek(std::shared_ptr<OpenFile> gkfs_fd, off64_t offset, unsigned int whence);
int gkfs_truncate(const std::string& path, off_t offset);
int gkfs_truncate(const std::string& path, off_t old_size, off_t new_size);
int gkfs_dup(int oldfd);
int gkfs_dup2(int oldfd, int newfd);
#ifdef HAS_SYMLINKS
int gkfs_mk_symlink(const std::string& path, const std::string& target_path);
int gkfs_readlink(const std::string& path, char* buf, int bufsize);
#endif
ssize_t gkfs_pwrite(std::shared_ptr<OpenFile> file,
const char* buf, size_t count, off64_t offset);
ssize_t gkfs_pwrite_ws(int fd, const void* buf, size_t count, off64_t offset);
ssize_t gkfs_write(int fd, const void* buf, size_t count);
ssize_t gkfs_pwritev(int fd, const struct iovec* iov, int iovcnt, off_t offset);
ssize_t gkfs_writev(int fd, const struct iovec* iov, int iovcnt);
ssize_t gkfs_pread(std::shared_ptr<OpenFile> file, char* buf, size_t count, off64_t offset);
ssize_t gkfs_pread_ws(int fd, void* buf, size_t count, off64_t offset);
ssize_t gkfs_read(int fd, void* buf, size_t count);
int gkfs_opendir(const std::string& path);
int getdents(unsigned int fd,
struct linux_dirent* dirp,
unsigned int count);
int getdents64(unsigned int fd,
struct linux_dirent64* dirp,
unsigned int count);
int gkfs_rmdir(const std::string& path);
#endif //GEKKOFS_GKFS_FUNCTIONS_HPP