Description of problem: ======================= If file is marked as 'Bad' then any access to that file from mount should get 'EIO' error till its recovered .(recovery using self heal/EC or manual) Version-Release number of selected component (if applicable): ============================================================= 3.7dev-0.952.gita7f1d08.el6.x86_64 How reproducible: ================= always Steps to Reproduce: =================== 1. create and mount volume. 2. enable bitrot 3. create file 4. modify file from backend(not from mount) 5. Once file is marked as bad, try to access it from mount. []# getfattr -d -m . /pavanbrick3/*/f9 -e hex getfattr: Removing leading '/' from absolute path names # file: pavanbrick3/r1/f9 security.selinux=0x756e636f6e66696e65645f753a6f626a6563745f723a64656661756c745f743a733000 trusted.gfid=0xc2ca6098ab304d9c9027df491e07c0f7 trusted.glusterfs.bad-file=0x3100 trusted.glusterfs.bit-rot.signature=0x010000000000000004000000000000009ad89c03b457431979ab5c44131dda04d1bc1652271cc7c37a91c3a10de6a6b0 trusted.glusterfs.bit-rot.version=0x0400000000000000552623db00042680 Actual Result:- =============== [root@rhs-client37 rac1]# cat f9 new new new new something corrupt Expect Result:- =============== Files marked as 'Bad' should not be accessible from mount and user should get EIO error
REVIEW: http://review.gluster.org/11126 (features/bit-rot-stub: deny access to bad objects) posted (#2) for review on master by Raghavendra Bhat (raghavendra)
REVIEW: http://review.gluster.org/11126 (features/bit-rot-stub: deny access to bad objects) posted (#3) for review on master by Raghavendra Bhat (raghavendra)
REVIEW: http://review.gluster.org/11126 (features/bit-rot-stub: deny access to bad objects) posted (#4) for review on master by Venky Shankar (vshankar)
REVIEW: http://review.gluster.org/11126 (features/bit-rot-stub: deny access to bad objects) posted (#5) for review on master by Venky Shankar (vshankar)
REVIEW: http://review.gluster.org/11126 (features/bit-rot-stub: deny access to bad objects) posted (#7) for review on master by Raghavendra Bhat (raghavendra)
REVIEW: http://review.gluster.org/11389 (features/bit-rot-stub: do not allow setxattr and removexattr on bit-rot xattrs) posted (#1) for review on master by Raghavendra Bhat (raghavendra)
REVIEW: http://review.gluster.org/11389 (features/bit-rot-stub: do not allow setxattr and removexattr on bit-rot xattrs) posted (#2) for review on master by Raghavendra Bhat (raghavendra)
REVIEW: http://review.gluster.org/11126 (features/bit-rot-stub: deny access to bad objects) posted (#8) for review on master by Raghavendra Bhat (raghavendra)
REVIEW: http://review.gluster.org/11389 (features/bit-rot-stub: do not allow setxattr and removexattr on bit-rot xattrs) posted (#3) for review on master by Raghavendra Bhat (raghavendra)
REVIEW: http://review.gluster.org/11389 (features/bit-rot-stub: do not allow setxattr and removexattr on bit-rot xattrs) posted (#4) for review on master by Raghavendra Bhat (raghavendra)
REVIEW: http://review.gluster.org/11126 (features/bit-rot-stub: deny access to bad objects) posted (#10) for review on master by Raghavendra Bhat (raghavendra)
COMMIT: http://review.gluster.org/11126 committed in master by Venky Shankar (vshankar) ------ commit 15dcfe98caa573e87d898cb66c13ef7187730c6b Author: Raghavendra Bhat <raghavendra> Date: Tue May 26 19:22:14 2015 +0530 features/bit-rot-stub: deny access to bad objects * Access to bad objects (especially operations such as open, readv, writev) should be denied to prevent applications from getting wrong data. * Do not allow anyone apart from scrubber to set bad object xattr. * Do not allow bad object xattr to be removed. Change-Id: Ia9185a067233a9f26e3d41d41d11d9a4eb0da827 BUG: 1210689 Signed-off-by: Raghavendra Bhat <raghavendra> Signed-off-by: Venky Shankar <vshankar> Signed-off-by: Raghavendra Bhat <raghavendra> Reviewed-on: http://review.gluster.org/11126 Tested-by: NetBSD Build System <jenkins.org>
COMMIT: http://review.gluster.org/11389 committed in master by Venky Shankar (vshankar) ------ commit 0a24b8f2be5f8b124d76a13f2a4b6cb9058c9a30 Author: Raghavendra Bhat <raghavendra> Date: Wed Jun 24 20:06:01 2015 +0530 features/bit-rot-stub: do not allow setxattr and removexattr on bit-rot xattrs * setxattr and {f}removexattr of versioning, signature and bad-file xattrs are returned with error. Change-Id: Ib423466195d1d8e4c6f80c2906a574e21ed624fb BUG: 1210689 Signed-off-by: Raghavendra Bhat <raghavendra> Reviewed-on: http://review.gluster.org/11389 Tested-by: NetBSD Build System <jenkins.org> Reviewed-by: Venky Shankar <vshankar>
Fix for this BZ is already present in a GlusterFS release. You can find clone of this BZ, fixed in a GlusterFS release and closed. Hence closing this mainline BZ as well.
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.8.0, please open a new bug report. glusterfs-3.8.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution. [1] http://blog.gluster.org/2016/06/glusterfs-3-8-released/ [2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user