From c980b76353c3e7629e5c2dc7bdf10c2184288ad4 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 27 Feb 2013 10:51:46 -0800 Subject: [PATCH] ceph-fuse: add ceph options for all current fuse options This will make it easier to disable these for end users, and for platforms with old libfuse versions that don't support them. Signed-off-by: Sage Weil --- src/client/fuse_ll.cc | 21 ++++++++++++--------- src/common/config_opts.h | 4 ++++ 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/client/fuse_ll.cc b/src/client/fuse_ll.cc index 3e14bc010d91b..57d79dfbe0327 100644 --- a/src/client/fuse_ll.cc +++ b/src/client/fuse_ll.cc @@ -610,19 +610,22 @@ int CephFuse::Handle::init(int argc, const char *argv[]) newargv[newargc++] = argv[0]; newargv[newargc++] = "-f"; // stay in foreground - newargv[newargc++] = "-o"; - newargv[newargc++] = "allow_other"; - - newargv[newargc++] = "-o"; - newargv[newargc++] = "default_permissions"; - + if (g_conf->fuse_allow_other) { + newargv[newargc++] = "-o"; + newargv[newargc++] = "allow_other"; + } + if (g_conf->fuse_default_permissions) { + newargv[newargc++] = "-o"; + newargv[newargc++] = "default_permissions"; + } if (g_conf->fuse_big_writes) { newargv[newargc++] = "-o"; newargv[newargc++] = "big_writes"; } - - newargv[newargc++] = "-o"; - newargv[newargc++] = "atomic_o_trunc"; + if (g_conf->fuse_atomic_o_trunc) { + newargv[newargc++] = "-o"; + newargv[newargc++] = "atomic_o_trunc"; + } if (g_conf->fuse_debug) newargv[newargc++] = "-d"; diff --git a/src/common/config_opts.h b/src/common/config_opts.h index aae1102f1a0a0..76135dcdc8945 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -39,6 +39,7 @@ OPTION(err_to_stderr, OPT_BOOL, true) OPTION(log_to_syslog, OPT_BOOL, false) OPTION(err_to_syslog, OPT_BOOL, false) OPTION(log_flush_on_exit, OPT_BOOL, true) +OPTION(log_stop_at_utilization, OPT_FLOAT, .97) // stop logging at (near) full OPTION(clog_to_monitors, OPT_BOOL, true) OPTION(clog_to_syslog, OPT_BOOL, false) @@ -217,7 +218,10 @@ OPTION(client_debug_force_sync_read, OPT_BOOL, false) // always read synchro OPTION(client_debug_inject_tick_delay, OPT_INT, 0) // delay the client tick for a number of seconds // note: the max amount of "in flight" dirty data is roughly (max - target) OPTION(fuse_use_invalidate_cb, OPT_BOOL, false) // use fuse 2.8+ invalidate callback to keep page cache consistent +OPTION(fuse_allow_other, OPT_BOOL, true) +OPTION(fuse_default_permissions, OPT_BOOL, true) OPTION(fuse_big_writes, OPT_BOOL, true) +OPTION(fuse_atomic_o_trunc, OPT_BOOL, true) OPTION(fuse_debug, OPT_BOOL, false) OPTION(objecter_tick_interval, OPT_DOUBLE, 5.0) OPTION(objecter_timeout, OPT_DOUBLE, 10.0) // before we ask for a map -- 2.39.5