diff options
author | Anuradha <atalur@redhat.com> | 2015-02-09 12:44:33 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2015-02-25 22:32:16 -0800 |
commit | 9112806b02b1c8668acff87af62553462aa7cf48 (patch) | |
tree | cfe127f02b7b847e8cbbbdbdb7ec1e2f7bee2cb1 /xlators/cluster/afr/src/afr-inode-read.c | |
parent | 1fd540c386b3b4a99e3ee1b926a30f0992266983 (diff) |
cluster/afr : provide split-brain info by using getxattr
This patch is one part to enable users analyze and resolve
split-brain.
Problem : To know if a file is in data/metadata split-brain
Solution : Performing "getfattr -n afr.split-brain-status
<path-to-file>" from the mount provides this information.
Also provides the list of afr children to analyse to
get more information.
Change-Id: I4d9b429794759a906371416cb84c84a212e2c7b9
BUG: 1191396
Signed-off-by: Anuradha <atalur@redhat.com>
Reviewed-on: http://review.gluster.org/9633
Reviewed-by: Ravishankar N <ravishankar@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-inode-read.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-inode-read.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr-inode-read.c b/xlators/cluster/afr/src/afr-inode-read.c index 78dd65f30e7..e773f3284a6 100644 --- a/xlators/cluster/afr/src/afr-inode-read.c +++ b/xlators/cluster/afr/src/afr-inode-read.c @@ -1385,6 +1385,10 @@ afr_getxattr (call_frame_t *frame, xlator_t *this, return 0; } + if (!strcmp (name, GF_AFR_SBRAIN_STATUS)) { + afr_get_split_brain_status (frame, this, loc); + return 0; + } /* * if we are doing getxattr with pathinfo as the key then we * collect information from all childs |