From 0d33cce6f7bbb71abe0086469f2f726151b0e62c Mon Sep 17 00:00:00 2001 From: Pavan Sondur Date: Sun, 22 Aug 2010 14:09:48 +0000 Subject: protocol/server: features/locks: Fix nonblocking entrylks, inodelks in locks and server. Signed-off-by: Pavan Vilas Sondur Signed-off-by: Anand V. Avati BUG: 960 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=960 --- xlators/protocol/server/src/server3_1-fops.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'xlators/protocol/server/src/server3_1-fops.c') diff --git a/xlators/protocol/server/src/server3_1-fops.c b/xlators/protocol/server/src/server3_1-fops.c index 9fbf720716b..69f37d6b370 100644 --- a/xlators/protocol/server/src/server3_1-fops.c +++ b/xlators/protocol/server/src/server3_1-fops.c @@ -242,10 +242,11 @@ server_inodelk_cbk (call_frame_t *frame, void *cookie, xlator_t *this, if (op_ret >= 0) { if (state->flock.l_type == F_UNLCK) gf_del_locker (conn->ltable, state->volume, - &state->loc, NULL, frame->root->pid); + &state->loc, NULL, frame->root->lk_owner); else gf_add_locker (conn->ltable, state->volume, - &state->loc, NULL, frame->root->pid); + &state->loc, NULL, frame->root->pid, + frame->root->lk_owner); } else if (op_errno != ENOSYS) { gf_log (this->name, GF_LOG_TRACE, "%"PRId64": INODELK %s (%"PRId64") ==> %"PRId32" (%s)", @@ -283,11 +284,12 @@ server_finodelk_cbk (call_frame_t *frame, void *cookie, xlator_t *this, if (state->flock.l_type == F_UNLCK) gf_del_locker (conn->ltable, state->volume, NULL, state->fd, - frame->root->pid); + frame->root->lk_owner); else gf_add_locker (conn->ltable, state->volume, NULL, state->fd, - frame->root->pid); + frame->root->pid, + frame->root->lk_owner); } else if (op_errno != ENOSYS) { gf_log (this->name, GF_LOG_TRACE, "%"PRId64": FINODELK %"PRId64" (%"PRId64") ==> %"PRId32" (%s)", @@ -323,10 +325,11 @@ server_entrylk_cbk (call_frame_t *frame, void *cookie, xlator_t *this, if (op_ret >= 0) { if (state->cmd == ENTRYLK_UNLOCK) gf_del_locker (conn->ltable, state->volume, - &state->loc, NULL, frame->root->pid); + &state->loc, NULL, frame->root->lk_owner); else gf_add_locker (conn->ltable, state->volume, - &state->loc, NULL, frame->root->pid); + &state->loc, NULL, frame->root->pid, + frame->root->lk_owner); } else if (op_errno != ENOSYS) { gf_log (this->name, GF_LOG_TRACE, "%"PRId64": INODELK %s (%"PRId64") ==> %"PRId32" (%s)", @@ -361,10 +364,11 @@ server_fentrylk_cbk (call_frame_t *frame, void *cookie, xlator_t *this, if (op_ret >= 0) { if (state->cmd == ENTRYLK_UNLOCK) gf_del_locker (conn->ltable, state->volume, - NULL, state->fd, frame->root->pid); + NULL, state->fd, frame->root->lk_owner); else gf_add_locker (conn->ltable, state->volume, - NULL, state->fd, frame->root->pid); + NULL, state->fd, frame->root->pid, + frame->root->lk_owner); } else if (op_errno != ENOSYS) { gf_log (this->name, GF_LOG_TRACE, "%"PRId64": FENTRYLK %"PRId64" (%"PRId64") " -- cgit