diff options
author | Pavan Sondur <pavan@gluster.com> | 2010-10-01 05:45:12 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-10-01 05:05:53 -0700 |
commit | fd2e7d007e5362f0738cd9a825349abcf5d27d8f (patch) | |
tree | d86cd9b0162cd43cb6d1e573b24f6c49a5e353f4 /xlators/features/locks/src | |
parent | 55c6e672503a2451186e17b9c1b7daf6e3ae5463 (diff) |
Changes to replace flock with gf_flock across GlusterFS.
Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 865 (Add locks recovery support in GlusterFS)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=865
Diffstat (limited to 'xlators/features/locks/src')
-rw-r--r-- | xlators/features/locks/src/common.c | 14 | ||||
-rw-r--r-- | xlators/features/locks/src/common.h | 12 | ||||
-rw-r--r-- | xlators/features/locks/src/inodelk.c | 12 | ||||
-rw-r--r-- | xlators/features/locks/src/locks.h | 4 | ||||
-rw-r--r-- | xlators/features/locks/src/posix.c | 12 |
5 files changed, 27 insertions, 27 deletions
diff --git a/xlators/features/locks/src/common.c b/xlators/features/locks/src/common.c index 9f2d11304df..0df5fcae5b8 100644 --- a/xlators/features/locks/src/common.c +++ b/xlators/features/locks/src/common.c @@ -176,7 +176,7 @@ pl_print_lockee (char *str, int size, fd_t *fd, loc_t *loc) void pl_print_lock (char *str, int size, int cmd, - struct flock *flock, uint64_t owner) + struct gf_flock *flock, uint64_t owner) { char *cmd_str = NULL; char *type_str = NULL; @@ -234,7 +234,7 @@ pl_print_lock (char *str, int size, int cmd, void pl_trace_in (xlator_t *this, call_frame_t *frame, fd_t *fd, loc_t *loc, - int cmd, struct flock *flock, const char *domain) + int cmd, struct gf_flock *flock, const char *domain) { posix_locks_private_t *priv = NULL; char pl_locker[256]; @@ -282,7 +282,7 @@ pl_print_verdict (char *str, int size, int op_ret, int op_errno) void pl_trace_out (xlator_t *this, call_frame_t *frame, fd_t *fd, loc_t *loc, - int cmd, struct flock *flock, int op_ret, int op_errno, const char *domain) + int cmd, struct gf_flock *flock, int op_ret, int op_errno, const char *domain) { posix_locks_private_t *priv = NULL; @@ -313,7 +313,7 @@ pl_trace_out (xlator_t *this, call_frame_t *frame, fd_t *fd, loc_t *loc, void pl_trace_block (xlator_t *this, call_frame_t *frame, fd_t *fd, loc_t *loc, - int cmd, struct flock *flock, const char *domain) + int cmd, struct gf_flock *flock, const char *domain) { posix_locks_private_t *priv = NULL; @@ -460,7 +460,7 @@ out: /* Create a new posix_lock_t */ posix_lock_t * -new_posix_lock (struct flock *flock, void *transport, pid_t client_pid, +new_posix_lock (struct gf_flock *flock, void *transport, pid_t client_pid, uint64_t owner, fd_t *fd) { posix_lock_t *lock = NULL; @@ -506,9 +506,9 @@ __destroy_lock (posix_lock_t *lock) } -/* Convert a posix_lock to a struct flock */ +/* Convert a posix_lock to a struct gf_flock */ void -posix_lock_to_flock (posix_lock_t *lock, struct flock *flock) +posix_lock_to_flock (posix_lock_t *lock, struct gf_flock *flock) { flock->l_pid = lock->client_pid; flock->l_type = lock->fl_type; diff --git a/xlators/features/locks/src/common.h b/xlators/features/locks/src/common.h index c7d817f8da0..72b113310b7 100644 --- a/xlators/features/locks/src/common.h +++ b/xlators/features/locks/src/common.h @@ -21,7 +21,7 @@ #define __COMMON_H__ posix_lock_t * -new_posix_lock (struct flock *flock, void *transport, pid_t client_pid, +new_posix_lock (struct gf_flock *flock, void *transport, pid_t client_pid, uint64_t owner, fd_t *fd); pl_inode_t * @@ -38,7 +38,7 @@ void grant_blocked_locks (xlator_t *this, pl_inode_t *inode); void -posix_lock_to_flock (posix_lock_t *lock, struct flock *flock); +posix_lock_to_flock (posix_lock_t *lock, struct gf_flock *flock); int locks_overlap (posix_lock_t *l1, posix_lock_t *l2); @@ -75,13 +75,13 @@ int32_t get_entrylk_count (xlator_t *this, inode_t *inode); void pl_trace_in (xlator_t *this, call_frame_t *frame, fd_t *fd, loc_t *loc, - int cmd, struct flock *flock, const char *domain); + int cmd, struct gf_flock *flock, const char *domain); void pl_trace_out (xlator_t *this, call_frame_t *frame, fd_t *fd, loc_t *loc, - int cmd, struct flock *flock, int op_ret, int op_errno, const char *domain); + int cmd, struct gf_flock *flock, int op_ret, int op_errno, const char *domain); void pl_trace_block (xlator_t *this, call_frame_t *frame, fd_t *fd, loc_t *loc, - int cmd, struct flock *flock, const char *domain); + int cmd, struct gf_flock *flock, const char *domain); void pl_trace_flush (xlator_t *this, call_frame_t *frame, fd_t *fd); @@ -108,7 +108,7 @@ void pl_print_locker (char *str, int size, xlator_t *this, call_frame_t *frame); void -pl_print_inodelk (char *str, int size, int cmd, struct flock *flock, const char *domain); +pl_print_inodelk (char *str, int size, int cmd, struct gf_flock *flock, const char *domain); void pl_trace_release (xlator_t *this, fd_t *fd); diff --git a/xlators/features/locks/src/inodelk.c b/xlators/features/locks/src/inodelk.c index eaae8d4deed..f0985c8ceca 100644 --- a/xlators/features/locks/src/inodelk.c +++ b/xlators/features/locks/src/inodelk.c @@ -56,7 +56,7 @@ inodelk_type_conflict (pl_inode_lock_t *l1, pl_inode_lock_t *l2) } void -pl_print_inodelk (char *str, int size, int cmd, struct flock *flock, const char *domain) +pl_print_inodelk (char *str, int size, int cmd, struct gf_flock *flock, const char *domain) { char *cmd_str = NULL; char *type_str = NULL; @@ -505,7 +505,7 @@ out: /* Create a new inode_lock_t */ pl_inode_lock_t * -new_inode_lock (struct flock *flock, void *transport, pid_t client_pid, +new_inode_lock (struct gf_flock *flock, void *transport, pid_t client_pid, uint64_t owner, const char *volume) { @@ -540,7 +540,7 @@ new_inode_lock (struct flock *flock, void *transport, pid_t client_pid, int pl_common_inodelk (call_frame_t *frame, xlator_t *this, const char *volume, inode_t *inode, int32_t cmd, - struct flock *flock, loc_t *loc, fd_t *fd) + struct gf_flock *flock, loc_t *loc, fd_t *fd) { int32_t op_ret = -1; int32_t op_errno = 0; @@ -612,7 +612,7 @@ pl_common_inodelk (call_frame_t *frame, xlator_t *this, /* fall through */ case F_SETLK: - memcpy (&reqlock->user_flock, flock, sizeof (struct flock)); + memcpy (&reqlock->user_flock, flock, sizeof (struct gf_flock)); ret = pl_inode_setlk (this, pinode, reqlock, can_block, dom); @@ -653,7 +653,7 @@ out: int pl_inodelk (call_frame_t *frame, xlator_t *this, - const char *volume, loc_t *loc, int32_t cmd, struct flock *flock) + const char *volume, loc_t *loc, int32_t cmd, struct gf_flock *flock) { pl_common_inodelk (frame, this, volume, loc->inode, cmd, flock, loc, NULL); @@ -663,7 +663,7 @@ pl_inodelk (call_frame_t *frame, xlator_t *this, int pl_finodelk (call_frame_t *frame, xlator_t *this, - const char *volume, fd_t *fd, int32_t cmd, struct flock *flock) + const char *volume, fd_t *fd, int32_t cmd, struct gf_flock *flock) { pl_common_inodelk (frame, this, volume, fd->inode, cmd, flock, NULL, fd); diff --git a/xlators/features/locks/src/locks.h b/xlators/features/locks/src/locks.h index 483e3e6669e..83683c3523c 100644 --- a/xlators/features/locks/src/locks.h +++ b/xlators/features/locks/src/locks.h @@ -40,7 +40,7 @@ struct __posix_lock { off_t fl_end; short blocked; /* waiting to acquire */ - struct flock user_flock; /* the flock supplied by the user */ + struct gf_flock user_flock; /* the flock supplied by the user */ xlator_t *this; /* required for blocked locks */ unsigned long fd_num; @@ -65,7 +65,7 @@ struct __pl_inode_lock { const char *volume; - struct flock user_flock; /* the flock supplied by the user */ + struct gf_flock user_flock; /* the flock supplied by the user */ xlator_t *this; /* required for blocked locks */ fd_t *fd; diff --git a/xlators/features/locks/src/posix.c b/xlators/features/locks/src/posix.c index 7c8ead8b383..1b3a1a60499 100644 --- a/xlators/features/locks/src/posix.c +++ b/xlators/features/locks/src/posix.c @@ -932,7 +932,7 @@ unlock: int pl_lk (call_frame_t *frame, xlator_t *this, - fd_t *fd, int32_t cmd, struct flock *flock) + fd_t *fd, int32_t cmd, struct gf_flock *flock) { void *transport = NULL; pid_t client_pid = 0; @@ -984,7 +984,7 @@ pl_lk (call_frame_t *frame, xlator_t *this, /* fall through */ case F_RESLK_LCK: - memcpy (&reqlock->user_flock, flock, sizeof (struct flock)); + memcpy (&reqlock->user_flock, flock, sizeof (struct gf_flock)); reqlock->frame = frame; reqlock->this = this; @@ -1065,7 +1065,7 @@ pl_lk (call_frame_t *frame, xlator_t *this, case F_SETLK64: #endif case F_SETLK: - memcpy (&reqlock->user_flock, flock, sizeof (struct flock)); + memcpy (&reqlock->user_flock, flock, sizeof (struct gf_flock)); ret = pl_verify_reservelk (this, pl_inode, reqlock, can_block); if (ret < 0) { gf_log (this->name, GF_LOG_TRACE, @@ -1439,7 +1439,7 @@ out: } void -pl_dump_lock (char *str, int size, struct flock *flock, +pl_dump_lock (char *str, int size, struct gf_flock *flock, uint64_t owner, void *trans) { char *type_str = NULL; @@ -1794,11 +1794,11 @@ fini (xlator_t *this) int pl_inodelk (call_frame_t *frame, xlator_t *this, - const char *volume, loc_t *loc, int32_t cmd, struct flock *flock); + const char *volume, loc_t *loc, int32_t cmd, struct gf_flock *flock); int pl_finodelk (call_frame_t *frame, xlator_t *this, - const char *volume, fd_t *fd, int32_t cmd, struct flock *flock); + const char *volume, fd_t *fd, int32_t cmd, struct gf_flock *flock); int pl_entrylk (call_frame_t *frame, xlator_t *this, |