From fd2e7d007e5362f0738cd9a825349abcf5d27d8f Mon Sep 17 00:00:00 2001 From: Pavan Sondur Date: Fri, 1 Oct 2010 05:45:12 +0000 Subject: Changes to replace flock with gf_flock across GlusterFS. Signed-off-by: Pavan Vilas Sondur Signed-off-by: Vijay Bellur BUG: 865 (Add locks recovery support in GlusterFS) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=865 --- contrib/fuse-lib/misc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'contrib/fuse-lib/misc.c') diff --git a/contrib/fuse-lib/misc.c b/contrib/fuse-lib/misc.c index 877c3880d..28a9284bf 100644 --- a/contrib/fuse-lib/misc.c +++ b/contrib/fuse-lib/misc.c @@ -10,6 +10,7 @@ #include #include #include +#include "glusterfs.h" #include "fuse_kernel.h" #include "fuse-misc.h" @@ -37,7 +38,8 @@ calc_timeout_nsec (double t) } void -convert_fuse_file_lock (struct fuse_file_lock *fl, struct flock *flock) +convert_fuse_file_lock (struct fuse_file_lock *fl, struct gf_flock *flock, + uint64_t lk_owner) { memset (flock, 0, sizeof (struct flock)); flock->l_type = fl->type; @@ -48,4 +50,5 @@ convert_fuse_file_lock (struct fuse_file_lock *fl, struct flock *flock) else flock->l_len = fl->end - fl->start + 1; flock->l_pid = fl->pid; + flock->l_owner = lk_owner; } -- cgit