diff options
author | Ravishankar N <ravishankar@redhat.com> | 2015-03-19 12:33:51 +0000 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2015-03-19 10:45:49 -0700 |
commit | 32ed7aa5ad7049a9d85c795f997336c0366151a8 (patch) | |
tree | dd5c31dea878b803f3164b4417ac6b72ded3bbbc /xlators/features/arbiter/src/arbiter.h | |
parent | 61489c1725f048c2e34a08e73f0ab367bbf673c1 (diff) |
afr: arbiter xlator
This patch adds the arbiter translator into the tree. This is a server
side xlator used for replica 3 volumes. It sits above posix and will be
loaded on the 3rd (last) brick of every afr subvolume in a replica 3
configuration. It intercepts inode read/write operations: reads are
unwound with ENOTCONN, inode writes are unwound with success without
actually passing them down to posix. Metadata operations are allowed to
pass through.
The CLI for creating a 3 way replica with arbiter is also added but kept
disabled (A 'normal' 3 way replica is created instead).
This patch is a part of the arbiter logic implementation for 3 way AFR,
details of which can be found at http://review.gluster.org/#/c/9656/
Change-Id: I395b81f49d5da52c466daf5c8518f1bbad9c16fa
BUG: 1199985
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-on: http://review.gluster.org/9840
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/features/arbiter/src/arbiter.h')
-rw-r--r-- | xlators/features/arbiter/src/arbiter.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/xlators/features/arbiter/src/arbiter.h b/xlators/features/arbiter/src/arbiter.h new file mode 100644 index 00000000000..69ce9cb4fa3 --- /dev/null +++ b/xlators/features/arbiter/src/arbiter.h @@ -0,0 +1,26 @@ +/* + Copyright (c) 2015 Red Hat, Inc. <http://www.redhat.com> + 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 _ARBITER_H +#define _ARBITER_H + +#ifndef _CONFIG_H +#define _CONFIG_H +#include "config.h" +#endif + +#include "locking.h" +#include "common-utils.h" + +typedef struct arbiter_inode_ctx_ { + struct iatt *iattbuf; +} arbiter_inode_ctx_t; + +#endif /* _ARBITER_H */ |