From ef158c75d1d6fac76635e95a9a43145433169b44 Mon Sep 17 00:00:00 2001 From: Atin Mukherjee Date: Sat, 30 Aug 2014 16:15:36 +0530 Subject: read-only: read-only/worm translator should be in brick graph by default Problem: read-only/worm translator is not loaded by default in brick graph because of which when read-only option is set through volume set volume still remains writable untill the bricks are restarted as the translator does not have an inmemory flag to decide whether the read-only/worm option is turned or not. Solution: read-only/worm should be loaded by default in brick graph and the read-only/worm option can be toggled through volume set command. read-only/worm translator now' has an in-memory flag to decide whether the volume is read-only or not and based on that either reject the fop or proceed. Change-Id: Ic79328698f6a72c50433cff15ecadb1a92acc643 BUG: 1134822 Signed-off-by: Atin Mukherjee Reviewed-on: http://review.gluster.org/8571 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/features/read-only/src/read-only-mem-types.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 xlators/features/read-only/src/read-only-mem-types.h (limited to 'xlators/features/read-only/src/read-only-mem-types.h') diff --git a/xlators/features/read-only/src/read-only-mem-types.h b/xlators/features/read-only/src/read-only-mem-types.h new file mode 100644 index 00000000000..940700a017d --- /dev/null +++ b/xlators/features/read-only/src/read-only-mem-types.h @@ -0,0 +1,20 @@ +/* + Copyright (c) 2014 Red Hat, Inc. + This file is part of GlusterFS. + + This file is licensed to you under your choice of the GNU Lesser + General Public License, version 3 or any later version (LGPLv3 or + later), or the GNU General Public License, version 2 (GPLv2), in all + cases as published by the Free Software Foundation. +*/ + +#ifndef __READONLY_MEM_TYPES_H__ +#define __READONLY_MEM_TYPES_H__ + +#include "mem-types.h" + +enum gf_read_only_mem_types_ { + gf_read_only_mt_priv_t = gf_common_mt_end + 1, + gf_read_only_mt_end +}; +#endif -- cgit