]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-fuse: add ceph options for all current fuse options
authorSage Weil <sage@inktank.com>
Wed, 27 Feb 2013 18:51:46 +0000 (10:51 -0800)
committerSage Weil <sage@inktank.com>
Wed, 27 Feb 2013 19:04:53 +0000 (11:04 -0800)
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>
src/client/fuse_ll.cc
src/common/config_opts.h

index 3e14bc010d91b5da5e601d10ef40272015a61dcf..57d79dfbe0327807253b7f229be4ae887ee8aa89 100644 (file)
@@ -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";
index aae1102f1a0a04b0615201dba5bd3ee76323fe9b..76135dcdc8945350fcae3ab2efc43f4a1a29a9a2 100644 (file)
@@ -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