summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-02-27 10:51:46 -0800
committerSage Weil <sage@inktank.com>2013-02-27 11:04:53 -0800
commitc980b76353c3e7629e5c2dc7bdf10c2184288ad4 (patch)
treed47913d8d97fa83fc59b5e1aeb3c88c13afa9916
parentbf2cad1af928f0d95dd954e37e4d196d0d53b8db (diff)
downloadceph-c980b76353c3e7629e5c2dc7bdf10c2184288ad4.tar.gz
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 <sage@inktank.com>
-rw-r--r--src/client/fuse_ll.cc21
-rw-r--r--src/common/config_opts.h4
2 files changed, 16 insertions, 9 deletions
diff --git a/src/client/fuse_ll.cc b/src/client/fuse_ll.cc
index 3e14bc010d9..57d79dfbe03 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 aae1102f1a0..76135dcdc89 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