summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr.h
diff options
context:
space:
mode:
authorVikas Gorur <vikas@gluster.com>2009-04-07 06:55:15 -0700
committerAnand V. Avati <avati@amp.gluster.com>2009-04-07 23:19:00 +0530
commitd46684117a02359886e096d1bcc9f590b54144a6 (patch)
tree0f6160978fd6f7399622c6c401cb9ee438154cd9 /xlators/cluster/afr/src/afr.h
parentd71e72248096d12ce2a8ca7ccb36ef97ae486583 (diff)
Consider a subvolume dead if an fop fails on it
Transaction fops earlier called afr_transaction_child_died only if an fop failed due to ENOTCONN or EBADFD. Now they consider a child dead regardless of the reason for failure. This handles cases such as ENOSPC. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr.h')
-rw-r--r--xlators/cluster/afr/src/afr.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h
index ac1a5f6ad..76ccec2ae 100644
--- a/xlators/cluster/afr/src/afr.h
+++ b/xlators/cluster/afr/src/afr.h
@@ -411,6 +411,8 @@ typedef struct _afr_local {
((op_errno == ENOTCONN) || \
(op_errno == EBADFD)))
+#define afr_fop_failed(op_ret, op_errno) ((op_ret) == -1)
+
/* have we tried all children? */
#define all_tried(i, count) ((i) == (count) - 1)