diff options
-rw-r--r-- | doc/README.fuse-io-uring | 8 | ||||
-rw-r--r-- | example/passthrough_hp.cc | 23 |
2 files changed, 6 insertions, 25 deletions
diff --git a/doc/README.fuse-io-uring b/doc/README.fuse-io-uring index 7207c6e..5134890 100644 --- a/doc/README.fuse-io-uring +++ b/doc/README.fuse-io-uring @@ -6,7 +6,7 @@ echo 1 > /sys/module/fuse/parameters/enable_uring Additionally, FUSE_CAP_OVER_IO_URING needs to be set and se->uring.enable has to be true. The latter can be -achieved with the libfuse option '-oio_uring'. +achieved with the libfuse option '-o io_uring'. Default queue-depth is 8 and can be changed with the parameter '-oio_uring_q_depth'. @@ -22,11 +22,11 @@ Benefits: Usage: To enable io_uring support when mounting a FUSE filesystem: 1. Enable kernel support: echo 1 > /sys/module/fuse/parameters/enable_uring -2. Mount with io_uring option: -oio_uring -3. Optionally adjust queue depth: -oio_uring_q_depth=<depth> +2. Mount with io_uring option: -o io_uring +3. Optionally adjust queue depth: -o io_uring_q_depth=<depth> Example: -./my_fuse_fs /source /mountpoint -oio_uring -oio_uring_q_depth=16 +./my_fuse_fs /source /mountpoint -o io_uring -o io_uring_q_depth=16 Requirements: - Linux kernel with io_uring and FUSE io_uring support enabled diff --git a/example/passthrough_hp.cc b/example/passthrough_hp.cc index b88c2c5..f1fc927 100644 --- a/example/passthrough_hp.cc +++ b/example/passthrough_hp.cc @@ -77,9 +77,6 @@ using namespace std; #define SFS_DEFAULT_THREADS "-1" // take libfuse value as default #define SFS_DEFAULT_CLONE_FD "0" -#define SFS_DEFAULT_URING "1" -#define SFS_DEFAULT_URING_Q_DEPTH "0" -#define SFS_DEFAULT_URING_ARGLEN "0" /* We are re-using pointers to our `struct sfs_inode` and `struct sfs_dirp` elements as inodes and file handles. This means that we @@ -158,10 +155,6 @@ struct Fs { bool nocache; size_t num_threads; bool clone_fd; - struct { - bool enable; - int queue_depth; - } uring; std::string fuse_mount_options; bool direct_io; @@ -1410,10 +1403,8 @@ static cxxopts::ParseResult parse_options(int argc, char **argv) { ("num-threads", "Number of libfuse worker threads", cxxopts::value<int>()->default_value(SFS_DEFAULT_THREADS)) ("clone-fd", "use separate fuse device fd for each thread") - ("direct-io", "enable fuse kernel internal direct-io") - ("uring", "use uring communication") - ("uring-q-depth", "io-uring queue depth", - cxxopts::value<int>()->default_value(SFS_DEFAULT_URING_Q_DEPTH)); + ("direct-io", "enable fuse kernel internal direct-io"); + // FIXME: Find a better way to limit the try clause to just // opt_parser.parse() (cf. https://github.com/jarro2783/cxxopts/issues/146) auto options = parse_wrapper(opt_parser, argc, argv); @@ -1446,9 +1437,6 @@ static cxxopts::ParseResult parse_options(int argc, char **argv) { fs.clone_fd = options.count("clone-fd"); fs.direct_io = options.count("direct-io"); - fs.uring.enable = options.count("uring"); - fs.uring.queue_depth = options["uring-q-depth"].as<int>(); - char* resolved_path = realpath(argv[1], NULL); if (resolved_path == NULL) warn("WARNING: realpath() failed with"); @@ -1534,13 +1522,6 @@ int main(int argc, char *argv[]) { (fs.debug_fuse && fuse_opt_add_arg(&args, "-odebug"))) errx(3, "ERROR: Out of memory adding arguments"); - if (fs.uring.enable) { - if (fuse_opt_add_arg(&args, "-oio_uring") || - fuse_opt_add_arg(&args, ("-oio_uring_q_depth=" + - std::to_string(fs.uring.queue_depth)).c_str())) - errx(3, "ERROR: Out of memory adding io-uring arguments"); - } - ret = -1; fuse_lowlevel_ops sfs_oper {}; assign_operations(sfs_oper); |