summaryrefslogtreecommitdiffstats
path: root/glusterfsd
diff options
context:
space:
mode:
authorshishir <shishirng@gluster.com>2011-07-19 16:02:12 +0530
committerAnand Avati <avati@gluster.com>2011-08-10 22:51:56 -0700
commit86999525240983dcbd3fe66eb40a0947730c695c (patch)
tree47ca5e1e42634de69280525f7032848cdcf6661f /glusterfsd
parent5ce1b5c357d490f68ae89bfd3ce31326a81a1183 (diff)
WORM: Write Once Read Many times xlator support
This xlator will allow files to be opened for write in append mode only. Mount with --worm(glusterfs) or -o worm (mount) option to enable worm xlator Change-Id: I1be02fcf2aee2182ea2c66b514357918136fabeb BUG: 3166 Reviewed-on: http://review.gluster.com/23 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
Diffstat (limited to 'glusterfsd')
-rw-r--r--glusterfsd/src/glusterfsd.c6
-rw-r--r--glusterfsd/src/glusterfsd.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c
index ae79a18..5ea542a 100644
--- a/glusterfsd/src/glusterfsd.c
+++ b/glusterfsd/src/glusterfsd.c
@@ -149,6 +149,8 @@ static struct argp_option gf_options[] = {
"Mount the filesystem in 'read-only' mode"},
{"acl", ARGP_ACL_KEY, 0, 0,
"Mount the filesystem with POSIX ACL support"},
+ {"worm", ARGP_WORM_KEY, 0, 0,
+ "Mount the filesystem in 'worm' mode"},
{"mac-compat", ARGP_MAC_COMPAT_KEY, "BOOL", OPTION_ARG_OPTIONAL,
"Provide stubs for attributes needed for seamless operation on Macs "
#ifdef GF_DARWIN_HOST_OS
@@ -511,6 +513,10 @@ parse_opts (int key, char *arg, struct argp_state *state)
cmd_args->acl = 1;
break;
+ case ARGP_WORM_KEY:
+ cmd_args->worm = 1;
+ break;
+
case ARGP_MAC_COMPAT_KEY:
if (!arg)
arg = "on";
diff --git a/glusterfsd/src/glusterfsd.h b/glusterfsd/src/glusterfsd.h
index f5013df..847cfb6 100644
--- a/glusterfsd/src/glusterfsd.h
+++ b/glusterfsd/src/glusterfsd.h
@@ -77,6 +77,7 @@ enum argp_option_keys {
ARGP_BRICK_PORT_KEY = 152,
ARGP_CLIENT_PID_KEY = 153,
ARGP_ACL_KEY = 154,
+ ARGP_WORM_KEY = 155,
};
int glusterfs_mgmt_pmap_signout (glusterfs_ctx_t *ctx);