From 33477a140fb4e891a05dd9261013e83035155350 Mon Sep 17 00:00:00 2001 From: Kaushal M Date: Wed, 2 Nov 2011 11:27:30 +0530 Subject: fuse: enable kernel read-only mode Enables kernel read-only mode on mounting with '-oro' and disables the gluster read-only translator from being loaded. As a result, '-oro' is reported correctly in the mount options. Change-Id: If94d97836b13668974cfac61b6e5d52e19880e10 BUG: 3742 Reviewed-on: http://review.gluster.com/655 Tested-by: Gluster Build System Reviewed-by: Jeff Darcy Reviewed-by: Csaba Henk --- glusterfsd/src/glusterfsd.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'glusterfsd') diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c index d02c4b7a960..244307d0835 100644 --- a/glusterfsd/src/glusterfsd.c +++ b/glusterfsd/src/glusterfsd.c @@ -322,6 +322,15 @@ create_fuse_mount (glusterfs_ctx_t *ctx) } } + if (cmd_args->read_only) { + ret = dict_set_static_ptr (master->options, "read-only", "on"); + if (ret < 0) { + gf_log ("glusterfsd", GF_LOG_ERROR, + "failed to set dict value for key read-only"); + goto err; + } + } + switch (cmd_args->fuse_direct_io_mode) { case GF_OPTION_DISABLE: /* disable */ ret = dict_set_static_ptr (master->options, ZR_DIRECT_IO_OPT, -- cgit