summaryrefslogtreecommitdiffstats
path: root/xlators/features/locks/src/posix.c
diff options
context:
space:
mode:
authorPavan Sondur <pavan@gluster.com>2009-12-03 14:51:10 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-12-03 12:45:11 -0800
commit120b446967ef33701a31d0da23324177922a3d73 (patch)
tree1331a92ed1dd0692dbec80f73ac40481da98dca5 /xlators/features/locks/src/posix.c
parent83487d024bcfe671ef83752c8c3a8b56b8dcee2b (diff)
features/locks: Changes in log messages reflecting lk-owner.
Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 336 (Use lock owner field from fuse in locks) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=336
Diffstat (limited to 'xlators/features/locks/src/posix.c')
-rw-r--r--xlators/features/locks/src/posix.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/xlators/features/locks/src/posix.c b/xlators/features/locks/src/posix.c
index 674485576..f3b95e059 100644
--- a/xlators/features/locks/src/posix.c
+++ b/xlators/features/locks/src/posix.c
@@ -237,7 +237,7 @@ unwind:
static void
__delete_locks_of_owner (pl_inode_t *pl_inode,
- transport_t *transport, pid_t pid)
+ transport_t *transport, uint64_t owner)
{
posix_lock_t *tmp = NULL;
posix_lock_t *l = NULL;
@@ -246,7 +246,7 @@ __delete_locks_of_owner (pl_inode_t *pl_inode,
list_for_each_entry_safe (l, tmp, &pl_inode->ext_list, list) {
if ((l->transport == transport)
- && (l->client_pid == pid)) {
+ && (l->owner == owner)) {
__delete_lock (pl_inode, l);
__destroy_lock (l);
}
@@ -288,7 +288,7 @@ pl_flush (call_frame_t *frame, xlator_t *this,
pthread_mutex_lock (&pl_inode->mutex);
{
__delete_locks_of_owner (pl_inode, frame->root->trans,
- frame->root->pid);
+ frame->root->lk_owner);
}
pthread_mutex_unlock (&pl_inode->mutex);
@@ -804,9 +804,10 @@ __get_posixlk_count (xlator_t *this, pl_inode_t *pl_inode)
gf_log (this->name, GF_LOG_DEBUG,
" XATTR DEBUG"
- "%s (pid=%d) %"PRId64" - %"PRId64" state: %s",
+ "%s (pid=%d) (lk-owner=%"PRIu64") %"PRId64" - %"PRId64" state: %s",
lock->fl_type == F_UNLCK ? "Unlock" : "Lock",
lock->client_pid,
+ lock->owner,
lock->user_flock.l_start,
lock->user_flock.l_len,
lock->blocked == 1 ? "Blocked" : "Active");