summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/client/src/client-lk.c
diff options
context:
space:
mode:
authorPavan Sondur <pavan@gluster.com>2010-10-01 05:45:12 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-10-01 05:05:53 -0700
commitfd2e7d007e5362f0738cd9a825349abcf5d27d8f (patch)
treed86cd9b0162cd43cb6d1e573b24f6c49a5e353f4 /xlators/protocol/client/src/client-lk.c
parent55c6e672503a2451186e17b9c1b7daf6e3ae5463 (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/protocol/client/src/client-lk.c')
-rw-r--r--xlators/protocol/client/src/client-lk.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/xlators/protocol/client/src/client-lk.c b/xlators/protocol/client/src/client-lk.c
index 37cae88b7d2..c5696500c5e 100644
--- a/xlators/protocol/client/src/client-lk.c
+++ b/xlators/protocol/client/src/client-lk.c
@@ -479,7 +479,7 @@ client_cmd_to_gf_cmd (int32_t cmd, int32_t *gf_cmd)
}
static client_posix_lock_t *
-new_client_lock (struct flock *flock, uint64_t owner,
+new_client_lock (struct gf_flock *flock, uint64_t owner,
int32_t cmd, fd_t *fd)
{
client_posix_lock_t *new_lock = NULL;
@@ -497,7 +497,7 @@ new_client_lock (struct flock *flock, uint64_t owner,
INIT_LIST_HEAD (&new_lock->list);
new_lock->fd = fd;
- memcpy (&new_lock->user_flock, flock, sizeof (struct flock));
+ memcpy (&new_lock->user_flock, flock, sizeof (struct gf_flock));
new_lock->fl_type = flock->l_type;
new_lock->fl_start = flock->l_start;
@@ -526,7 +526,7 @@ client_save_number_fds (clnt_conf_t *conf, int count)
}
int
-client_add_lock_for_recovery (fd_t *fd, struct flock *flock, uint64_t owner,
+client_add_lock_for_recovery (fd_t *fd, struct gf_flock *flock, uint64_t owner,
int32_t cmd)
{
clnt_fd_ctx_t *fdctx = NULL;
@@ -568,7 +568,7 @@ out:
}
static int
-construct_reserve_unlock (struct flock *lock, call_frame_t *frame,
+construct_reserve_unlock (struct gf_flock *lock, call_frame_t *frame,
client_posix_lock_t *client_lock)
{
GF_ASSERT (lock);
@@ -588,11 +588,11 @@ construct_reserve_unlock (struct flock *lock, call_frame_t *frame,
static int
construct_reserve_lock (client_posix_lock_t *client_lock, call_frame_t *frame,
- struct flock *lock)
+ struct gf_flock *lock)
{
GF_ASSERT (client_lock);
- memcpy (lock, &(client_lock->user_flock), sizeof (struct flock));
+ memcpy (lock, &(client_lock->user_flock), sizeof (struct gf_flock));
frame->root->lk_owner = client_lock->owner;
@@ -625,7 +625,7 @@ client_remove_reserve_lock_cbk (call_frame_t *frame,
xlator_t *this,
int32_t op_ret,
int32_t op_errno,
- struct flock *lock)
+ struct gf_flock *lock)
{
clnt_local_t *local = NULL;
clnt_conf_t *conf = NULL;
@@ -665,7 +665,7 @@ static void
client_remove_reserve_lock (xlator_t *this, call_frame_t *frame,
client_posix_lock_t *lock)
{
- struct flock unlock;
+ struct gf_flock unlock;
clnt_local_t *local = NULL;
local = frame->local;
@@ -705,7 +705,7 @@ client_reserve_lock_cbk (call_frame_t *frame,
xlator_t *this,
int32_t op_ret,
int32_t op_errno,
- struct flock *lock)
+ struct gf_flock *lock)
{
clnt_local_t *local = NULL;
@@ -761,14 +761,14 @@ client_recovery_lock_cbk (call_frame_t *frame,
xlator_t *this,
int32_t op_ret,
int32_t op_errno,
- struct flock *lock)
+ struct gf_flock *lock)
{
clnt_local_t *local = NULL;
clnt_fd_ctx_t *fdctx = NULL;
clnt_conf_t *conf = NULL;
client_posix_lock_t *next_lock = NULL;
- struct flock reserve_flock;
+ struct gf_flock reserve_flock;
uint64_t fd_count = 0;
local = frame->local;
@@ -864,7 +864,7 @@ client_attempt_lock_recovery (xlator_t *this, clnt_fd_ctx_t *fdctx)
clnt_local_t *local = NULL;
client_posix_lock_t *lock = NULL;
- struct flock reserve_flock;
+ struct gf_flock reserve_flock;
int ret = 0;
local = GF_CALLOC (1, sizeof (*local), gf_client_mt_clnt_local_t);