diff options
author | Vikas Gorur <vikas@gluster.com> | 2009-04-07 06:55:15 -0700 |
---|---|---|
committer | Anand V. Avati <avati@amp.gluster.com> | 2009-04-07 23:19:00 +0530 |
commit | d46684117a02359886e096d1bcc9f590b54144a6 (patch) | |
tree | 0f6160978fd6f7399622c6c401cb9ee438154cd9 /xlators/cluster/afr/src/afr-inode-write.c | |
parent | d71e72248096d12ce2a8ca7ccb36ef97ae486583 (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-inode-write.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-inode-write.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/xlators/cluster/afr/src/afr-inode-write.c b/xlators/cluster/afr/src/afr-inode-write.c index cf4d493a4f3..025bf8af4c1 100644 --- a/xlators/cluster/afr/src/afr-inode-write.c +++ b/xlators/cluster/afr/src/afr-inode-write.c @@ -94,7 +94,7 @@ afr_chmod_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this, LOCK (&frame->lock); { - if (child_went_down (op_ret, op_errno)) + if (afr_fop_failed (op_ret, op_errno)) afr_transaction_child_died (frame, this, child_index); if (op_ret != -1) { @@ -289,7 +289,7 @@ afr_fchmod_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this, LOCK (&frame->lock); { - if (child_went_down (op_ret, op_errno)) + if (afr_fop_failed (op_ret, op_errno)) afr_transaction_child_died (frame, this, child_index); if (op_ret != -1) { @@ -483,7 +483,7 @@ afr_chown_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this, LOCK (&frame->lock); { - if (child_went_down (op_ret, op_errno)) + if (afr_fop_failed (op_ret, op_errno)) afr_transaction_child_died (frame, this, child_index); if (op_ret != -1) { @@ -681,7 +681,7 @@ afr_fchown_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this, LOCK (&frame->lock); { - if (child_went_down (op_ret, op_errno)) + if (afr_fop_failed (op_ret, op_errno)) afr_transaction_child_died (frame, this, child_index); if (op_ret != -1) { @@ -878,7 +878,7 @@ afr_writev_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this, LOCK (&frame->lock); { - if (child_went_down (op_ret, op_errno)) + if (afr_fop_failed (op_ret, op_errno)) afr_transaction_child_died (frame, this, child_index); if (op_ret != -1) { @@ -1092,7 +1092,7 @@ afr_truncate_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this, LOCK (&frame->lock); { - if (child_went_down (op_ret, op_errno)) + if (afr_fop_failed (op_ret, op_errno)) afr_transaction_child_died (frame, this, child_index); if (op_ret != -1) { @@ -1291,7 +1291,7 @@ afr_ftruncate_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this, LOCK (&frame->lock); { - if (child_went_down (op_ret, op_errno)) + if (afr_fop_failed (op_ret, op_errno)) afr_transaction_child_died (frame, this, child_index); if (op_ret != -1) { @@ -1489,7 +1489,7 @@ afr_utimens_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this, LOCK (&frame->lock); { - if (child_went_down (op_ret, op_errno)) + if (afr_fop_failed (op_ret, op_errno)) afr_transaction_child_died (frame, this, child_index); if (op_ret != -1) { |