diff options
Diffstat (limited to 'glusterfsd')
-rw-r--r-- | glusterfsd/src/glusterfsd.c | 24 | ||||
-rw-r--r-- | glusterfsd/src/glusterfsd.h | 1 |
2 files changed, 25 insertions, 0 deletions
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c index df5b9ed0b31..c1b66ef0d32 100644 --- a/glusterfsd/src/glusterfsd.c +++ b/glusterfsd/src/glusterfsd.c @@ -270,6 +270,11 @@ static struct argp_option gf_options[] = { {"fuse-flush-handle-interrupt", ARGP_FUSE_FLUSH_HANDLE_INTERRUPT_KEY, "BOOL", OPTION_ARG_OPTIONAL | OPTION_HIDDEN, "handle interrupt in fuse FLUSH handler"}, + {"auto-invalidation", ARGP_FUSE_AUTO_INVAL_KEY, "BOOL", OPTION_ARG_OPTIONAL, + "controls whether fuse-kernel can auto-invalidate " + "attribute, dentry and page-cache. " + "Disable this only if same files/directories are not accessed across " + "two different mounts concurrently [default: \"on\"]"}, {0, 0, 0, 0, "Miscellaneous Options:"}, { 0, @@ -623,6 +628,15 @@ set_fuse_mount_options(glusterfs_ctx_t *ctx, dict_t *options) goto err; } } + + ret = dict_set_uint32(options, "auto-invalidation", + cmd_args->fuse_auto_inval); + if (ret < 0) { + gf_msg("glusterfsd", GF_LOG_ERROR, 0, glusterfsd_msg_4, + "failed to set dict value for key auto-invalidation"); + goto err; + } + switch (cmd_args->kernel_writeback_cache) { case GF_OPTION_ENABLE: ret = dict_set_static_ptr(options, "kernel-writeback-cache", "on"); @@ -1483,6 +1497,16 @@ parse_opts(int key, char *arg, struct argp_state *state) "unknown fuse flush handle interrupt setting \"%s\"", arg); break; + case ARGP_FUSE_AUTO_INVAL_KEY: + if (!arg) + arg = "yes"; + + if (gf_string2boolean(arg, &b) == 0) { + cmd_args->fuse_auto_inval = b; + break; + } + + break; } return 0; } diff --git a/glusterfsd/src/glusterfsd.h b/glusterfsd/src/glusterfsd.h index 86ac61c1a92..35cf6d88b7a 100644 --- a/glusterfsd/src/glusterfsd.h +++ b/glusterfsd/src/glusterfsd.h @@ -110,6 +110,7 @@ enum argp_option_keys { ARGP_PRINT_LIBEXECDIR_KEY = 188, ARGP_FUSE_FLUSH_HANDLE_INTERRUPT_KEY = 189, ARGP_FUSE_LRU_LIMIT_KEY = 190, + ARGP_FUSE_AUTO_INVAL_KEY = 191, }; struct _gfd_vol_top_priv { |