path: root/xlators/cluster/afr/src/afr.h
diff options
authorPranith Kumar K <>2017-09-04 16:57:25 +0530
committerPranith Kumar Karampuri <>2017-10-26 18:23:35 +0000
commit786343abca3474ff01aa1017210112d97cbc4843 (patch)
tree0077eacbf8b9e7f9638a7b694f7a092e4546111a /xlators/cluster/afr/src/afr.h
parent0bb928264a9fb100dc927687eed6ad4d22675950 (diff)
cluster/afr: Fail open on split-brain
Problem: Append on a file with split-brain succeeds. Open is intercepted by open-behind, when write comes on the file, open-behind does open+write. Open succeeds because afr doesn't fail it. Then write succeeds because write-behind intercepts it. Flush is also intercepted by write-behind, so the application never gets to know that the write failed. Fix: Fail open on split-brain, so that when open-behind does open+write open fails which leads to write failure. Application will know about this failure. Change-Id: I4bff1c747c97bb2925d6987f4ced5f1ce75dbc15 BUG: 1294051 Signed-off-by: Pranith Kumar K <>
Diffstat (limited to 'xlators/cluster/afr/src/afr.h')
1 files changed, 4 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h
index c4ceb66914f..8cd687398f0 100644
--- a/xlators/cluster/afr/src/afr.h
+++ b/xlators/cluster/afr/src/afr.h
@@ -519,6 +519,7 @@ typedef struct _afr_local {
struct {
int32_t flags;
+ fd_t *fd;
} open;
struct {
@@ -1213,7 +1214,7 @@ int
afr_get_msg_id (char *op_type);
-afr_set_in_flight_sb_status (xlator_t *this, afr_local_t *local,
+afr_set_in_flight_sb_status (xlator_t *this, call_frame_t *frame,
inode_t *inode);
@@ -1262,4 +1263,6 @@ int
afr_serialize_xattrs_with_delimiter (call_frame_t *frame, xlator_t *this,
char *buf, const char *default_str,
int32_t *serz_len, char delimiter);
+afr_is_symmetric_error (call_frame_t *frame, xlator_t *this);
#endif /* __AFR_H__ */