move requesting of FUSE flags to init from cli args

This commit is contained in:
Antonio SJ Musumeci 2015-08-05 11:50:21 -04:00
parent 81dbafdc19
commit 267f2d291c
2 changed files with 23 additions and 5 deletions

View File

@ -33,9 +33,27 @@ namespace mergerfs
void * void *
init(struct fuse_conn_info *conn) init(struct fuse_conn_info *conn)
{ {
#ifdef FUSE_CAP_ASYNC_READ
conn->want |= FUSE_CAP_ASYNC_READ;
#endif
#ifdef FUSE_CAP_IOCTL_DIR #ifdef FUSE_CAP_IOCTL_DIR
conn->want |= FUSE_CAP_IOCTL_DIR; conn->want |= FUSE_CAP_IOCTL_DIR;
#endif #endif
#ifdef FUSE_CAP_ATOMIC_O_TRUNC
conn->want |= FUSE_CAP_ATOMIC_O_TRUNC;
#endif
#ifdef FUSE_CAP_BIG_WRITES
conn->want |= FUSE_CAP_BIG_WRITES;
#endif
#ifdef FUSE_CAP_SPLICE_WRITE
conn->want |= FUSE_CAP_SPLICE_WRITE;
#endif
#ifdef FUSE_CAP_SPLICE_READ
conn->want |= FUSE_CAP_SPLICE_READ;
#endif
#ifdef FUSE_CAP_SPLICE_MOVE
conn->want |= FUSE_CAP_SPLICE_MOVE;
#endif
return &config::get_writable(); return &config::get_writable();
} }

View File

@ -94,12 +94,12 @@ static
void void
set_default_options(struct fuse_args &args) set_default_options(struct fuse_args &args)
{ {
set_option(args,"big_writes"); // set_option(args,"big_writes");
set_option(args,"splice_read"); // set_option(args,"splice_read");
set_option(args,"splice_write"); // set_option(args,"splice_write");
set_option(args,"splice_move"); // set_option(args,"splice_move");
set_option(args,"auto_cache"); set_option(args,"auto_cache");
set_option(args,"atomic_o_trunc"); // set_option(args,"atomic_o_trunc");
} }
static static