aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2006-07-28 15:00:20 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2006-07-31 15:44:29 -0400
commitde9b75d31e81e87685d8cc70052a003c654f1e8e (patch)
tree0af16068399368810bf4358893e477b64271ff4b
parent420b9e5e45d33355471c8d2d593bb0e5d6c77421 (diff)
[GFS2] add plock owner
We need to use fl_owner instead of fl_pid to track the owner of a posix lock. Pass the owner value out to user space where cluster plocks are managed. Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
-rw-r--r--fs/gfs2/locking/dlm/plock.c2
-rw-r--r--include/linux/lock_dlm_plock.h3
2 files changed, 4 insertions, 1 deletions
diff --git a/fs/gfs2/locking/dlm/plock.c b/fs/gfs2/locking/dlm/plock.c
index 6adfb2d4fd8c..e5b11f0688f6 100644
--- a/fs/gfs2/locking/dlm/plock.c
+++ b/fs/gfs2/locking/dlm/plock.c
@@ -77,6 +77,7 @@ int gdlm_plock(lm_lockspace_t *lockspace, struct lm_lockname *name,
77 op->info.number = name->ln_number; 77 op->info.number = name->ln_number;
78 op->info.start = fl->fl_start; 78 op->info.start = fl->fl_start;
79 op->info.end = fl->fl_end; 79 op->info.end = fl->fl_end;
80 op->info.owner = (__u64)(long) fl->fl_owner;
80 81
81 send_op(op); 82 send_op(op);
82 wait_event(recv_wq, (op->done != 0)); 83 wait_event(recv_wq, (op->done != 0));
@@ -122,6 +123,7 @@ int gdlm_punlock(lm_lockspace_t *lockspace, struct lm_lockname *name,
122 op->info.number = name->ln_number; 123 op->info.number = name->ln_number;
123 op->info.start = fl->fl_start; 124 op->info.start = fl->fl_start;
124 op->info.end = fl->fl_end; 125 op->info.end = fl->fl_end;
126 op->info.owner = (__u64)(long) fl->fl_owner;
125 127
126 send_op(op); 128 send_op(op);
127 wait_event(recv_wq, (op->done != 0)); 129 wait_event(recv_wq, (op->done != 0));
diff --git a/include/linux/lock_dlm_plock.h b/include/linux/lock_dlm_plock.h
index 007b07a178ab..fc3415113973 100644
--- a/include/linux/lock_dlm_plock.h
+++ b/include/linux/lock_dlm_plock.h
@@ -12,7 +12,7 @@
12#define GDLM_PLOCK_MISC_NAME "lock_dlm_plock" 12#define GDLM_PLOCK_MISC_NAME "lock_dlm_plock"
13 13
14#define GDLM_PLOCK_VERSION_MAJOR 1 14#define GDLM_PLOCK_VERSION_MAJOR 1
15#define GDLM_PLOCK_VERSION_MINOR 0 15#define GDLM_PLOCK_VERSION_MINOR 1
16#define GDLM_PLOCK_VERSION_PATCH 0 16#define GDLM_PLOCK_VERSION_PATCH 0
17 17
18enum { 18enum {
@@ -34,6 +34,7 @@ struct gdlm_plock_info {
34 __u64 number; 34 __u64 number;
35 __u64 start; 35 __u64 start;
36 __u64 end; 36 __u64 end;
37 __u64 owner;
37}; 38};
38 39
39#endif 40#endif