From b371736a58a3c0174fbd8823d51c690ec9d4f7d3 Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Tue, 19 Feb 2013 13:22:25 +0530 Subject: cluster/afr: do complete split-brain check in all the fd based fops fd based operations such as readv checked only for data split brain instead of complete split-brain (i.e both data + metadata) assuming that open would have done the complete split-brain check. However open-behind would have unwound open, without winding to afr thus preventing the complete split-brain check and some appliations will be able to read the contents of the file even though the file has metadata split-brain. So let all the fd based fops do a defensive check of complete split-brain. Change-Id: Ia90b35f2b08426dfcad804b7f8105278c86fbd2d BUG: 846240 Signed-off-by: Raghavendra Bhat Reviewed-on: http://review.gluster.org/4548 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- xlators/cluster/afr/src/afr-common.c | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'xlators/cluster/afr/src/afr-common.c') diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index 80134640..e66be035 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -324,21 +324,6 @@ out: return spb; } -gf_boolean_t -afr_is_data_split_brain (xlator_t *this, inode_t *inode) -{ - afr_inode_ctx_t *ctx = NULL; - gf_boolean_t spb = _gf_false; - - ctx = afr_inode_ctx_get (inode, this); - if (!ctx) - goto out; - if (ctx->data_spb == SPB) - spb = _gf_true; -out: - return spb; -} - gf_boolean_t afr_is_opendir_done (xlator_t *this, inode_t *inode) { -- cgit