summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src
diff options
context:
space:
mode:
authorPavan Sondur <pavan@gluster.com>2010-10-05 04:48:27 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-10-05 03:43:10 -0700
commitf62ff8a8df7ab7c0c551b650f9bd2f1a87b8dc71 (patch)
treec2efc82e784eabe228cc3de0c5b10c57eb56d76e /xlators/cluster/afr/src
parent79342c436fb994e6a41e3c7b69c962af37e8946a (diff)
features/locks: cluster/afr: Misc fixes for lock recovery.
Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 865 (Add locks recovery support in GlusterFS) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=865
Diffstat (limited to 'xlators/cluster/afr/src')
-rw-r--r--xlators/cluster/afr/src/afr-lk-common.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/xlators/cluster/afr/src/afr-lk-common.c b/xlators/cluster/afr/src/afr-lk-common.c
index dd2dffb3926..69160d72ff2 100644
--- a/xlators/cluster/afr/src/afr-lk-common.c
+++ b/xlators/cluster/afr/src/afr-lk-common.c
@@ -1846,6 +1846,9 @@ afr_recover_lock_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t source_child = 0;
struct gf_flock flock = {0,};
+ local = frame->local;
+ priv = this->private;
+
if (op_ret) {
gf_log (this->name, GF_LOG_DEBUG,
"lock recovery failed");
@@ -1898,7 +1901,7 @@ is_afr_lock_eol (struct gf_flock *lock)
{
int ret = 0;
- if ((lock->l_type = GF_LK_EOL))
+ if ((lock->l_type == GF_LK_EOL))
ret = 1;
return ret;
@@ -2144,7 +2147,7 @@ afr_attempt_lock_recovery (xlator_t *this, int32_t child_index)
list_del_init (&locked_fd->list);
- local->fd = locked_fd->fd;
+ local->fd = fd_ref (locked_fd->fd);
local->lock_recovery_child = child_index;
local->locked_fd = locked_fd;