summaryrefslogtreecommitdiffstats
path: root/glusterfsd
diff options
context:
space:
mode:
authorCsaba Henk <csaba@gluster.com>2010-08-27 09:39:33 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-09-02 09:50:11 -0700
commit588d807bdcbf5ed4df4d903428ab701479e9f8ac (patch)
tree005dbca4c07f5093bb77f2bc86c087a2459a9ab1 /glusterfsd
parent77db91866e9e8b333017e3bdb3079d024bb94818 (diff)
fuse: introduce pre-test micro-framework, check for execve-over-direct-IO
The presence of some potential FUSE features in the actual kernel-side FUSE implementation we run on is not always straightforward. More precisely, it is straightforward only if there is a dedicated feature flag or protocol revision number. In the other cases we are left to clumsy and platform specific hacks which wire in 3rd-party software revision numbers into our source... at least, if we insist on sticking to (the otherwise venerable) KISS principle. However, here we go for another route, loosely inspired by the way autotools provide an abstraction layer for our build system over the gory details of platform specific build environments. At start time, we use a preliminary set of FUSE operations which overlay the standard ones such that apart from the "usual stuff", they also present some synthetic files to the FUSE client (kernel). Then we spawn some test programs which perform the needed tests on these synthetic files to evaulate the FUSE implementation in terms of the features in question. According to the result of the test programs, we set the respective parameters of the fuse xlator; when the testing phase is over, the FUSE operation set is replaced by the standard one. As of now, we use this approach to test whether execve(2) works with direct I/O. If yes, and if glusterfs is used with --enable-direct-io-mode, then we let direct I/O for files opened for reading; if no, then we restrict direct I/O only to writing files. Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 801 (Direct io-mode support and related changes in caching translators.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=801
Diffstat (limited to 'glusterfsd')
-rw-r--r--glusterfsd/src/glusterfsd.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c
index bce5bfd..31fbaa9 100644
--- a/glusterfsd/src/glusterfsd.c
+++ b/glusterfsd/src/glusterfsd.c
@@ -896,14 +896,10 @@ glusterfs_ctx_defaults_init (glusterfs_ctx_t *ctx)
cmd_args->log_level = DEFAULT_LOG_LEVEL;
#ifdef GF_DARWIN_HOST_OS
cmd_args->mac_compat = GF_OPTION_DEFERRED;
- /* On Darwin machines, O_APPEND is not handled,
- * which may corrupt the data
- */
- cmd_args->fuse_direct_io_mode = GF_OPTION_DISABLE;
#else
cmd_args->mac_compat = GF_OPTION_DISABLE;
- cmd_args->fuse_direct_io_mode = GF_OPTION_DEFERRED;
#endif
+ cmd_args->fuse_direct_io_mode = GF_OPTION_DEFERRED;
cmd_args->fuse_attribute_timeout = -1;
INIT_LIST_HEAD (&cmd_args->xlator_options);