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-dir-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-dir-write.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-dir-write.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/xlators/cluster/afr/src/afr-dir-write.c b/xlators/cluster/afr/src/afr-dir-write.c index 5c6c1473691..89d38caacf3 100644 --- a/xlators/cluster/afr/src/afr-dir-write.c +++ b/xlators/cluster/afr/src/afr-dir-write.c @@ -119,7 +119,7 @@ afr_create_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) { @@ -348,7 +348,7 @@ afr_mknod_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) { @@ -573,7 +573,7 @@ afr_mkdir_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) { @@ -800,7 +800,7 @@ afr_link_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) { @@ -1025,7 +1025,7 @@ afr_symlink_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) { @@ -1250,7 +1250,7 @@ afr_rename_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) && (local->success_count == 0)) { @@ -1443,7 +1443,7 @@ afr_unlink_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) { @@ -1631,7 +1631,7 @@ afr_rmdir_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) { @@ -1791,7 +1791,7 @@ afr_setdents_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) && (local->success_count == 0)) { |