From 86999525240983dcbd3fe66eb40a0947730c695c Mon Sep 17 00:00:00 2001 From: shishir Date: Tue, 19 Jul 2011 16:02:12 +0530 Subject: 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 Reviewed-by: Anand Avati --- glusterfsd/src/glusterfsd.c | 6 ++++++ glusterfsd/src/glusterfsd.h | 1 + 2 files changed, 7 insertions(+) (limited to 'glusterfsd') diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c index ae79a188c..5ea542ab0 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 f5013dfe6..847cfb63f 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); -- cgit