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 --- xlators/mount/fuse/utils/mount.glusterfs.in | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'xlators/mount/fuse/utils') diff --git a/xlators/mount/fuse/utils/mount.glusterfs.in b/xlators/mount/fuse/utils/mount.glusterfs.in index 4a50c0ed6..1b01e1ec9 100755 --- a/xlators/mount/fuse/utils/mount.glusterfs.in +++ b/xlators/mount/fuse/utils/mount.glusterfs.in @@ -77,6 +77,10 @@ start_glusterfs () cmd_line=$(echo "$cmd_line --acl"); fi + if [ -n "$worm" ]; then + cmd_line=$(echo "$cmd_line --worm"); + fi + if [ -n "$log_file" ]; then cmd_line=$(echo "$cmd_line --log-file=$log_file"); fi @@ -190,6 +194,8 @@ main () acl=$(echo "$options" | sed -n 's/.*\(acl\)[^,]*.*/\1/p'); + worm=$(echo "$options" | sed -n 's/.*\(worm\)[^,]*.*/\1/p'); + transport=$(echo "$options" | sed -n 's/.*transport=\([^,]*\).*/\1/p'); direct_io_mode=$(echo "$options" | sed -n 's/.*direct-io-mode=\([^,]*\).*/\1/p'); @@ -230,6 +236,7 @@ main () -e 's/[,]*log-server=[^,]*//' \ -e 's/[,]*ro[^,]*//' \ -e 's/[,]*acl[^,]*//' \ + -e 's/[,]*worm[^,]*//' \ -e 's/[,]*log-server-port=[^,]*//'); # -- cgit