summaryrefslogtreecommitdiffstats
path: root/xlators/features/snapview-server/src/snapview-server.c
diff options
context:
space:
mode:
authorvmallika <vmallika@redhat.com>2014-11-13 15:13:39 +0530
committerRaghavendra Bhat <raghavendra@redhat.com>2014-12-22 04:19:04 -0800
commitfc67bb6e45da96aee381ca804d79c94d4e3a59a6 (patch)
tree7a193f5d697af5aeabdfd8321d0ffd9637410d76 /xlators/features/snapview-server/src/snapview-server.c
parentf9b4ef19d9e80ab4723e947a04c1c094843a0b6f (diff)
uss/gluster: creating file/directories inside .snaps should fail with EROFS.
When an attempt is made to create file/directories inside .snaps, it fails with wrong error message as "Stale file handle". It should fail with "Read-only file system" Change-Id: I3a812a0afc4762cbb71ab180b9394c866e576a66 BUG: 1175730 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/9039 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Signed-off-by: Sachin Pandit <spandit@redhat.com> Reviewed-on: http://review.gluster.org/9300 Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Diffstat (limited to 'xlators/features/snapview-server/src/snapview-server.c')
-rw-r--r--xlators/features/snapview-server/src/snapview-server.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/xlators/features/snapview-server/src/snapview-server.c b/xlators/features/snapview-server/src/snapview-server.c
index 8921909d7ee..2f15f5ef264 100644
--- a/xlators/features/snapview-server/src/snapview-server.c
+++ b/xlators/features/snapview-server/src/snapview-server.c
@@ -211,13 +211,12 @@ svs_lookup_snapshot (xlator_t *this, loc_t *loc, struct iatt *buf,
GF_VALIDATE_OR_GOTO (this->name, parent_ctx, out);
GF_VALIDATE_OR_GOTO (this->name, parent, out);
- fs = svs_initialise_snapshot_volume (this, loc->name);
+ fs = svs_initialise_snapshot_volume (this, loc->name, op_errno);
if (!fs) {
gf_log (this->name, GF_LOG_ERROR, "failed to "
"create the fs instance for snap %s",
loc->name);
op_ret = -1;
- *op_errno = ESTALE;
goto out;
}
@@ -534,7 +533,7 @@ svs_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata)
dirent = svs_get_latest_snap_entry (this);
if (dirent && !dirent->fs) {
- fs = svs_initialise_snapshot_volume (this, dirent->name);
+ fs = svs_initialise_snapshot_volume (this, dirent->name, NULL);
}
/* lookup is on the entry point to the snapshot world */