summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorvmallika <vmallika@redhat.com>2014-10-08 12:26:37 +0530
committerKrishnan Parthasarathi <kparthas@redhat.com>2014-11-10 21:33:07 -0800
commit60f12e0eaf11a42f3f5ee8978ba540bbb6c8aadb (patch)
treea48b3e32f66be3bc7c5b014f581178a2fb3f597f /xlators
parent7c3609efb458ec270b53b852b2bb877900d9e68d (diff)
glusterd/snapshot: mount snapshot volume with read-only option
Snapshot volumes are readonly. If you mount the volume to the client it doesn't allow writes, but its attributes are rw which contradicts the functionality. mount script should set read-only attributes for snapshot volumes. Change-Id: I056253abd8dfe7b2b43a064fbdbd9c16b8eca679 BUG: 1132946 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/8518 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Avra Sengupta <asengupt@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
Diffstat (limited to 'xlators')
-rwxr-xr-xxlators/mount/fuse/utils/mount.glusterfs.in5
1 files changed, 5 insertions, 0 deletions
diff --git a/xlators/mount/fuse/utils/mount.glusterfs.in b/xlators/mount/fuse/utils/mount.glusterfs.in
index c8c32c66eb6..d491cc33c89 100755
--- a/xlators/mount/fuse/utils/mount.glusterfs.in
+++ b/xlators/mount/fuse/utils/mount.glusterfs.in
@@ -638,6 +638,11 @@ EOF
exit 32;
fi
+ #Snapshot volumes are mounted read only
+ case $volume_id in
+ /snaps/* ) read_only=1
+ esac
+
check_recursive_mount "$mount_point";
update_updatedb;