From 40a7537556a7eb0a7c90ec6e7e2fd4014beae092 Mon Sep 17 00:00:00 2001 From: karthik-us Date: Fri, 3 Jun 2016 01:04:01 +0530 Subject: features/worm: fixed issue with write FOP for normal files The write FOPs on normal files were being blocked after the recent change. It should fail only for the WORM and WORM-Retained files, and should pass for a normal file. Using auto-commit period to check for dormant files instead of retention period. Change-Id: I30f82d4de2ea2c59c1eb7b4449ba6a60e568cfd5 BUG: 1342259 Signed-off-by: karthik-us Reviewed-on: http://review.gluster.org/14619 Smoke: Gluster Build System CentOS-regression: Gluster Build System NetBSD-regression: NetBSD Build System Reviewed-by: Joseph Fernandes Reviewed-by: Manikandan Selvaganesh --- xlators/features/read-only/src/worm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'xlators/features/read-only/src/worm.c') diff --git a/xlators/features/read-only/src/worm.c b/xlators/features/read-only/src/worm.c index ad06f46a4e4..3e32d65dbac 100644 --- a/xlators/features/read-only/src/worm.c +++ b/xlators/features/read-only/src/worm.c @@ -370,8 +370,11 @@ worm_writev (call_frame_t *frame, xlator_t *this, fd_t *fd, goto out; } ret = worm_get_state (this, _gf_true, fd, &reten_state); - if (ret) + if (ret) { + if (ret == -1) + op_errno = 0; goto out; + } if (!reten_state.worm) op_errno = 0; -- cgit