summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/server/src/server3_1-fops.c
diff options
context:
space:
mode:
authorMohammed Junaid Ahmed <junaid@gluster.com>2011-01-03 00:37:22 +0000
committerAnand V. Avati <avati@dev.gluster.com>2011-01-24 14:19:44 -0800
commit5fd43d28ff12ac1c4e4d60e77a38659013b1ab3a (patch)
tree6c34905d7f7dd073ccd9abfceadef3221f41d32a /xlators/protocol/server/src/server3_1-fops.c
parentdf6d34d0042421bb87f30bcf5e03d4ba0de7501c (diff)
protocol/server: Distinguishing the locks based on the type of fop like inodelk and entrylk.
Currently, the protocol server considers entrylk to be held only on directories and inodelk on files and thus when a client unmounts itself while holding locks, it fails to free entrylk locks held on files and inodelk locks held on directories. Signed-off-by: Junaid <junaid@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2221 (Failed to free Inodlk locks on directories when the client holding the locks was unmounted before releasing the locks held.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2221
Diffstat (limited to 'xlators/protocol/server/src/server3_1-fops.c')
-rw-r--r--xlators/protocol/server/src/server3_1-fops.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/xlators/protocol/server/src/server3_1-fops.c b/xlators/protocol/server/src/server3_1-fops.c
index fb3010e29..d18133b27 100644
--- a/xlators/protocol/server/src/server3_1-fops.c
+++ b/xlators/protocol/server/src/server3_1-fops.c
@@ -239,11 +239,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->lk_owner);
+ &state->loc, NULL, frame->root->lk_owner, GF_FOP_INODELK);
else
gf_add_locker (conn->ltable, state->volume,
&state->loc, NULL, frame->root->pid,
- frame->root->lk_owner);
+ frame->root->lk_owner, GF_FOP_INODELK);
} else if (op_errno != ENOSYS) {
gf_log (this->name, GF_LOG_TRACE,
"%"PRId64": INODELK %s (%"PRId64") ==> %"PRId32" (%s)",
@@ -280,12 +280,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->lk_owner);
+ frame->root->lk_owner, GF_FOP_INODELK);
else
gf_add_locker (conn->ltable, state->volume,
NULL, state->fd,
frame->root->pid,
- frame->root->lk_owner);
+ frame->root->lk_owner, GF_FOP_INODELK);
} else if (op_errno != ENOSYS) {
gf_log (this->name, GF_LOG_TRACE,
"%"PRId64": FINODELK %"PRId64" (%"PRId64") ==> %"PRId32" (%s)",
@@ -320,11 +320,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->lk_owner);
+ &state->loc, NULL, frame->root->lk_owner, GF_FOP_ENTRYLK);
else
gf_add_locker (conn->ltable, state->volume,
&state->loc, NULL, frame->root->pid,
- frame->root->lk_owner);
+ frame->root->lk_owner, GF_FOP_ENTRYLK);
} else if (op_errno != ENOSYS) {
gf_log (this->name, GF_LOG_TRACE,
"%"PRId64": INODELK %s (%"PRId64") ==> %"PRId32" (%s)",
@@ -358,11 +358,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->lk_owner);
+ NULL, state->fd, frame->root->lk_owner, GF_FOP_ENTRYLK);
else
gf_add_locker (conn->ltable, state->volume,
NULL, state->fd, frame->root->pid,
- frame->root->lk_owner);
+ frame->root->lk_owner, GF_FOP_ENTRYLK);
} else if (op_errno != ENOSYS) {
gf_log (this->name, GF_LOG_TRACE,
"%"PRId64": FENTRYLK %"PRId64" (%"PRId64") "