mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-12-01 20:36:37 -05:00
support RHEL6. closes #29
This commit is contained in:
parent
39c750b368
commit
613b996296
8 changed files with 75 additions and 27 deletions
|
|
@ -22,6 +22,8 @@
|
|||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#if FALLOCATE
|
||||
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
|
|
@ -82,3 +84,5 @@ namespace mergerfs
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -33,7 +33,9 @@ namespace mergerfs
|
|||
void *
|
||||
init(struct fuse_conn_info *conn)
|
||||
{
|
||||
#ifdef FUSE_CAP_IOCTL_DIR
|
||||
conn->want |= FUSE_CAP_IOCTL_DIR;
|
||||
#endif
|
||||
|
||||
return &config::get_writable();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@ _ioctl(const int fd,
|
|||
return ((rv == -1) ? -errno : rv);
|
||||
}
|
||||
|
||||
#ifdef FUSE_IOCTL_DIR
|
||||
static
|
||||
int
|
||||
_ioctl_dir_base(const fs::SearchFunc searchFunc,
|
||||
|
|
@ -130,6 +131,7 @@ _ioctl_dir(const string fusepath,
|
|||
flags,
|
||||
data);
|
||||
}
|
||||
#endif
|
||||
|
||||
namespace mergerfs
|
||||
{
|
||||
|
|
@ -145,12 +147,14 @@ namespace mergerfs
|
|||
{
|
||||
const FileInfo *fileinfo = (FileInfo*)ffi->fh;
|
||||
|
||||
#ifdef FUSE_IOCTL_DIR
|
||||
if(flags & FUSE_IOCTL_DIR)
|
||||
return _ioctl_dir(fusepath,
|
||||
cmd,
|
||||
arg,
|
||||
flags,
|
||||
data);
|
||||
#endif
|
||||
|
||||
return _ioctl(fileinfo->fd,
|
||||
cmd,
|
||||
|
|
|
|||
|
|
@ -76,9 +76,11 @@ static
|
|||
struct fuse_operations
|
||||
get_fuse_operations()
|
||||
{
|
||||
struct fuse_operations ops = {};
|
||||
struct fuse_operations ops = {0};
|
||||
|
||||
#if FLAG_NOPATH
|
||||
ops.flag_nopath = false;
|
||||
#endif
|
||||
ops.flag_nullpath_ok = false;
|
||||
|
||||
ops.access = mergerfs::access::access;
|
||||
|
|
@ -87,9 +89,13 @@ get_fuse_operations()
|
|||
ops.chown = mergerfs::chown::chown;
|
||||
ops.create = mergerfs::create::create;
|
||||
ops.destroy = mergerfs::destroy::destroy;
|
||||
#if FALLOCATE
|
||||
ops.fallocate = mergerfs::fallocate::fallocate;
|
||||
#endif
|
||||
ops.fgetattr = mergerfs::fgetattr::fgetattr;
|
||||
#if FLOCK
|
||||
ops.flock = NULL;
|
||||
#endif
|
||||
ops.flush = mergerfs::flush::flush;
|
||||
ops.fsync = mergerfs::fsync::fsync;
|
||||
ops.fsyncdir = NULL;
|
||||
|
|
@ -108,7 +114,9 @@ get_fuse_operations()
|
|||
ops.opendir = mergerfs::opendir::opendir;
|
||||
ops.poll = NULL;
|
||||
ops.read = mergerfs::read::read;
|
||||
#if READ_BUF
|
||||
ops.read_buf = mergerfs::read_buf::read_buf;
|
||||
#endif
|
||||
ops.readdir = mergerfs::readdir::readdir;
|
||||
ops.readlink = mergerfs::readlink::readlink;
|
||||
ops.release = mergerfs::release::release;
|
||||
|
|
@ -124,7 +132,9 @@ get_fuse_operations()
|
|||
ops.utime = NULL; /* deprecated; use utimens() */
|
||||
ops.utimens = mergerfs::utimens::utimens;
|
||||
ops.write = mergerfs::write::write;
|
||||
#if WRITE_BUF
|
||||
ops.write_buf = mergerfs::write_buf::write_buf;
|
||||
#endif
|
||||
|
||||
return ops;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@
|
|||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#if READ_BUF
|
||||
|
||||
#include <fuse.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
|
@ -72,3 +74,5 @@ namespace mergerfs
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@
|
|||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#if WRITE_BUF
|
||||
|
||||
#include <fuse.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
|
@ -63,3 +65,5 @@ namespace mergerfs
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue