Skip to content

Commit

Permalink
[GFS2] add plock owner
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Teigland authored and Steven Whitehouse committed Jul 31, 2006
1 parent 420b9e5 commit de9b75d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions fs/gfs2/locking/dlm/plock.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ int gdlm_plock(lm_lockspace_t *lockspace, struct lm_lockname *name,
op->info.number = name->ln_number;
op->info.start = fl->fl_start;
op->info.end = fl->fl_end;
op->info.owner = (__u64)(long) fl->fl_owner;

send_op(op);
wait_event(recv_wq, (op->done != 0));
Expand Down Expand Up @@ -122,6 +123,7 @@ int gdlm_punlock(lm_lockspace_t *lockspace, struct lm_lockname *name,
op->info.number = name->ln_number;
op->info.start = fl->fl_start;
op->info.end = fl->fl_end;
op->info.owner = (__u64)(long) fl->fl_owner;

send_op(op);
wait_event(recv_wq, (op->done != 0));
Expand Down
3 changes: 2 additions & 1 deletion include/linux/lock_dlm_plock.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#define GDLM_PLOCK_MISC_NAME "lock_dlm_plock"

#define GDLM_PLOCK_VERSION_MAJOR 1
#define GDLM_PLOCK_VERSION_MINOR 0
#define GDLM_PLOCK_VERSION_MINOR 1
#define GDLM_PLOCK_VERSION_PATCH 0

enum {
Expand All @@ -34,6 +34,7 @@ struct gdlm_plock_info {
__u64 number;
__u64 start;
__u64 end;
__u64 owner;
};

#endif
Expand Down

0 comments on commit de9b75d

Please sign in to comment.