From 5144d3d5a4982a86f46ef023d0dc836d0fdead58 Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Tue, 26 May 2015 19:22:14 +0530 Subject: features/bit-rot-stub: deny access to bad objects Backport of http://review.gluster.org/11126 * 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: I6903184ab64a9d1ea595330b603935979c33bc26 BUG: 1241529 Reviewed-on: http://review.gluster.org/11603 Tested-by: NetBSD Build System Tested-by: Gluster Build System Reviewed-by: Venky Shankar --- libglusterfs/src/glusterfs.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libglusterfs') diff --git a/libglusterfs/src/glusterfs.h b/libglusterfs/src/glusterfs.h index 62f08fb08db..29f16fc6033 100644 --- a/libglusterfs/src/glusterfs.h +++ b/libglusterfs/src/glusterfs.h @@ -127,6 +127,9 @@ #define BITROT_CURRENT_VERSION_KEY "trusted.bit-rot.version" #define BITROT_SIGNING_VERSION_KEY "trusted.bit-rot.signature" +/* globally usable bad file marker */ +#define GLUSTERFS_BAD_INODE "glusterfs.bad-inode" + /* on-disk size of signing xattr (not the signature itself) */ #define BITROT_SIGNING_XATTR_SIZE_KEY "trusted.glusterfs.bit-rot.size" -- cgit