diff options
| author | Anand Avati <avati@gluster.com> | 2009-10-13 06:27:22 +0000 | 
|---|---|---|
| committer | Anand V. Avati <avati@dev.gluster.com> | 2009-10-13 05:46:52 -0700 | 
| commit | 92a5fd621db0949637bb37e698709271e13610df (patch) | |
| tree | 4db9f98e4bf13292bb00071ed5c81659bfe5ac26 | |
| parent | fd441bca2a68ca93765f7a270cab1b7ffdf90799 (diff) | |
afr transaction prevent spurious unlocks
mark a subvol with held lock only if op_ret == 0
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 112 (parallel deletion of files mounted by different clients on the same back-end hangs and/or does not completely delete)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=112
| -rw-r--r-- | xlators/cluster/afr/src/afr-transaction.c | 6 | 
1 files changed, 4 insertions, 2 deletions
diff --git a/xlators/cluster/afr/src/afr-transaction.c b/xlators/cluster/afr/src/afr-transaction.c index 5f2696b6445..40a4bb26ada 100644 --- a/xlators/cluster/afr/src/afr-transaction.c +++ b/xlators/cluster/afr/src/afr-transaction.c @@ -919,8 +919,10 @@ afr_lock_cbk (call_frame_t *frame, void *cookie, xlator_t *this,              (local->op_errno == ENOSYS)) {                  afr_unlock (frame, this);          } else { -                local->transaction.locked_nodes[child_index] = 1; -                local->transaction.lock_count++; +                if (op_ret == 0) { +                        local->transaction.locked_nodes[child_index] = 1; +                        local->transaction.lock_count++; +                }                  afr_lock_rec (frame, this, child_index + 1);          }  | 
