diff options
Diffstat (limited to 'xlators/protocol')
-rw-r--r-- | xlators/protocol/client/src/client-lk.c | 24 | ||||
-rw-r--r-- | xlators/protocol/client/src/client.c | 6 | ||||
-rw-r--r-- | xlators/protocol/client/src/client.h | 6 | ||||
-rw-r--r-- | xlators/protocol/client/src/client3_1-fops.c | 10 | ||||
-rw-r--r-- | xlators/protocol/legacy/client/src/client-protocol.c | 8 | ||||
-rw-r--r-- | xlators/protocol/legacy/lib/src/protocol.h | 4 | ||||
-rw-r--r-- | xlators/protocol/legacy/server/src/server-helpers.c | 4 | ||||
-rw-r--r-- | xlators/protocol/legacy/server/src/server-protocol.c | 2 | ||||
-rw-r--r-- | xlators/protocol/legacy/server/src/server-protocol.h | 2 | ||||
-rw-r--r-- | xlators/protocol/server/src/server-helpers.c | 4 | ||||
-rw-r--r-- | xlators/protocol/server/src/server.h | 2 | ||||
-rw-r--r-- | xlators/protocol/server/src/server3_1-fops.c | 10 |
12 files changed, 41 insertions, 41 deletions
diff --git a/xlators/protocol/client/src/client-lk.c b/xlators/protocol/client/src/client-lk.c index 37cae88b7..c5696500c 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); diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c index 84f377839..4297c628d 100644 --- a/xlators/protocol/client/src/client.c +++ b/xlators/protocol/client/src/client.c @@ -1184,7 +1184,7 @@ out: int32_t client_lk (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t cmd, - struct flock *lock) + struct gf_flock *lock) { int ret = -1; clnt_conf_t *conf = NULL; @@ -1212,7 +1212,7 @@ out: int32_t client_inodelk (call_frame_t *frame, xlator_t *this, const char *volume, - loc_t *loc, int32_t cmd, struct flock *lock) + loc_t *loc, int32_t cmd, struct gf_flock *lock) { int ret = -1; clnt_conf_t *conf = NULL; @@ -1242,7 +1242,7 @@ out: int32_t client_finodelk (call_frame_t *frame, xlator_t *this, const char *volume, - fd_t *fd, int32_t cmd, struct flock *lock) + fd_t *fd, int32_t cmd, struct gf_flock *lock) { int ret = -1; clnt_conf_t *conf = NULL; diff --git a/xlators/protocol/client/src/client.h b/xlators/protocol/client/src/client.h index a31873a02..1e90c5935 100644 --- a/xlators/protocol/client/src/client.h +++ b/xlators/protocol/client/src/client.h @@ -80,7 +80,7 @@ typedef struct _client_fd_ctx { typedef struct _client_posix_lock { fd_t *fd; /* The fd on which the lk operation was made */ - struct flock user_flock; /* the flock supplied by the user */ + struct gf_flock user_flock; /* the flock supplied by the user */ off_t fl_start; off_t fl_end; short fl_type; @@ -120,7 +120,7 @@ typedef struct client_args { loc_t *oldloc; loc_t *newloc; const char *name; - struct flock *flock; + struct gf_flock *flock; const char *volume; const char *basename; off_t offset; @@ -166,7 +166,7 @@ int clnt_readdir_rsp_cleanup (gfs3_readdir_rsp *rsp); int clnt_readdirp_rsp_cleanup (gfs3_readdirp_rsp *rsp); int client_attempt_lock_recovery (xlator_t *this, clnt_fd_ctx_t *fdctx); int32_t delete_granted_locks_owner (fd_t *fd, uint64_t owner); -int client_add_lock_for_recovery (fd_t *fd, struct flock *flock, uint64_t owner, +int client_add_lock_for_recovery (fd_t *fd, struct gf_flock *flock, uint64_t owner, int32_t cmd); uint64_t decrement_reopen_fd_count (xlator_t *this, clnt_conf_t *conf); int32_t delete_granted_locks_fd (clnt_fd_ctx_t *fdctx); diff --git a/xlators/protocol/client/src/client3_1-fops.c b/xlators/protocol/client/src/client3_1-fops.c index 31cf93015..786db4c79 100644 --- a/xlators/protocol/client/src/client3_1-fops.c +++ b/xlators/protocol/client/src/client3_1-fops.c @@ -1526,7 +1526,7 @@ client3_1_lk_cbk (struct rpc_req *req, struct iovec *iov, int count, { call_frame_t *frame = NULL; clnt_local_t *local = NULL; - struct flock lock = {0,}; + struct gf_flock lock = {0,}; gfs3_lk_rsp rsp = {0,}; int ret = 0; @@ -1548,7 +1548,7 @@ client3_1_lk_cbk (struct rpc_req *req, struct iovec *iov, int count, } if (rsp.op_ret >= 0) { - gf_flock_to_flock (&rsp.flock, &lock); + gf_proto_flock_to_flock (&rsp.flock, &lock); } /* Save the lock to the client lock cache to be able @@ -4377,7 +4377,7 @@ client3_1_lk (call_frame_t *frame, xlator_t *this, req.fd = fdctx->remote_fd; req.cmd = gf_cmd; req.type = gf_type; - gf_flock_from_flock (&req.flock, args->flock); + gf_proto_flock_from_flock (&req.flock, args->flock); ret = client_submit_request (this, &req, frame, conf->fops, GFS3_OP_LK, client3_1_lk_cbk, NULL, xdr_from_lk_req, @@ -4443,7 +4443,7 @@ client3_1_inodelk (call_frame_t *frame, xlator_t *this, req.volume = (char *)args->volume; req.cmd = gf_cmd; req.type = gf_type; - gf_flock_from_flock (&req.flock, args->flock); + gf_proto_flock_from_flock (&req.flock, args->flock); conf = this->private; @@ -4533,7 +4533,7 @@ client3_1_finodelk (call_frame_t *frame, xlator_t *this, req.fd = fdctx->remote_fd; req.cmd = gf_cmd; req.type = gf_type; - gf_flock_from_flock (&req.flock, args->flock); + gf_proto_flock_from_flock (&req.flock, args->flock); ret = client_submit_request (this, &req, frame, conf->fops, GFS3_OP_FINODELK, diff --git a/xlators/protocol/legacy/client/src/client-protocol.c b/xlators/protocol/legacy/client/src/client-protocol.c index ebb4e6fcf..c9ef0d9e3 100644 --- a/xlators/protocol/legacy/client/src/client-protocol.c +++ b/xlators/protocol/legacy/client/src/client-protocol.c @@ -2815,7 +2815,7 @@ unwind: int client_lk (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t cmd, - struct flock *flock) + struct gf_flock *flock) { int ret = -1; gf_hdr_common_t *hdr = NULL; @@ -2912,7 +2912,7 @@ unwind: int client_inodelk (call_frame_t *frame, xlator_t *this, const char *volume, - loc_t *loc, int32_t cmd, struct flock *flock) + loc_t *loc, int32_t cmd, struct gf_flock *flock) { int ret = -1; gf_hdr_common_t *hdr = NULL; @@ -3007,7 +3007,7 @@ unwind: int client_finodelk (call_frame_t *frame, xlator_t *this, const char *volume, - fd_t *fd, int32_t cmd, struct flock *flock) + fd_t *fd, int32_t cmd, struct gf_flock *flock) { int ret = -1; gf_hdr_common_t *hdr = NULL; @@ -5046,7 +5046,7 @@ int client_lk_common_cbk (call_frame_t *frame, gf_hdr_common_t *hdr, size_t hdrlen, struct iobuf *iobuf) { - struct flock lock = {0,}; + struct gf_flock lock = {0,}; gf_fop_lk_rsp_t *rsp = NULL; int32_t op_ret = 0; int32_t op_errno = 0; diff --git a/xlators/protocol/legacy/lib/src/protocol.h b/xlators/protocol/legacy/lib/src/protocol.h index e929693d7..bc00450e1 100644 --- a/xlators/protocol/legacy/lib/src/protocol.h +++ b/xlators/protocol/legacy/lib/src/protocol.h @@ -299,7 +299,7 @@ struct gf_flock { static inline void -gf_flock_to_flock (struct gf_flock *gf_flock, struct flock *flock) +gf_flock_to_flock (struct gf_flock *gf_flock, struct gf_flock *flock) { flock->l_type = ntoh16 (gf_flock->type); flock->l_whence = ntoh16 (gf_flock->whence); @@ -310,7 +310,7 @@ gf_flock_to_flock (struct gf_flock *gf_flock, struct flock *flock) static inline void -gf_flock_from_flock (struct gf_flock *gf_flock, struct flock *flock) +gf_flock_from_flock (struct gf_flock *gf_flock, struct gf_flock *flock) { gf_flock->type = hton16 (flock->l_type); gf_flock->whence = hton16 (flock->l_whence); diff --git a/xlators/protocol/legacy/server/src/server-helpers.c b/xlators/protocol/legacy/server/src/server-helpers.c index 08f89af5a..b285d90ff 100644 --- a/xlators/protocol/legacy/server/src/server-helpers.c +++ b/xlators/protocol/legacy/server/src/server-helpers.c @@ -162,7 +162,7 @@ do_lock_table_cleanup (xlator_t *this, server_connection_t *conn, { struct list_head file_lockers, dir_lockers; call_frame_t *tmp_frame = NULL; - struct flock flock = {0, }; + struct gf_flock flock = {0, }; xlator_t *bound_xl = NULL; struct _locker *locker = NULL, *tmp = NULL; int ret = -1; @@ -395,7 +395,7 @@ server_connection_destroy (xlator_t *this, server_connection_t *conn) struct list_head dir_lockers; struct _lock_table *ltable = NULL; struct _locker *locker = NULL, *tmp = NULL; - struct flock flock = {0,}; + struct gf_flock flock = {0,}; fd_t *fd = NULL; int32_t i = 0; fdentry_t *fdentries = NULL; diff --git a/xlators/protocol/legacy/server/src/server-protocol.c b/xlators/protocol/legacy/server/src/server-protocol.c index b2ce4bd11..cbb9ce635 100644 --- a/xlators/protocol/legacy/server/src/server-protocol.c +++ b/xlators/protocol/legacy/server/src/server-protocol.c @@ -463,7 +463,7 @@ gf_del_locker (struct _lock_table *table, const char *volume, */ static int server_lk_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno, struct flock *lock) + int32_t op_ret, int32_t op_errno, struct gf_flock *lock) { gf_hdr_common_t *hdr = NULL; gf_fop_lk_rsp_t *rsp = NULL; diff --git a/xlators/protocol/legacy/server/src/server-protocol.h b/xlators/protocol/legacy/server/src/server-protocol.h index 136912871..e2e1738e9 100644 --- a/xlators/protocol/legacy/server/src/server-protocol.h +++ b/xlators/protocol/legacy/server/src/server-protocol.h @@ -182,7 +182,7 @@ struct _server_state { int mask; char is_revalidate; dict_t *dict; - struct flock flock; + struct gf_flock flock; const char *volume; dir_entry_t *entry; }; diff --git a/xlators/protocol/server/src/server-helpers.c b/xlators/protocol/server/src/server-helpers.c index 59a498971..e63bc2002 100644 --- a/xlators/protocol/server/src/server-helpers.c +++ b/xlators/protocol/server/src/server-helpers.c @@ -281,7 +281,7 @@ do_lock_table_cleanup (xlator_t *this, server_connection_t *conn, { struct list_head file_lockers, dir_lockers; call_frame_t *tmp_frame = NULL; - struct flock flock = {0, }; + struct gf_flock flock = {0, }; xlator_t *bound_xl = NULL; struct _locker *locker = NULL, *tmp = NULL; int ret = -1; @@ -518,7 +518,7 @@ server_connection_destroy (xlator_t *this, server_connection_t *conn) struct list_head dir_lockers; struct _lock_table *ltable = NULL; struct _locker *locker = NULL, *tmp = NULL; - struct flock flock = {0,}; + struct gf_flock flock = {0,}; fd_t *fd = NULL; int32_t i = 0; fdentry_t *fdentries = NULL; diff --git a/xlators/protocol/server/src/server.h b/xlators/protocol/server/src/server.h index a86c6b318..5786ae5b5 100644 --- a/xlators/protocol/server/src/server.h +++ b/xlators/protocol/server/src/server.h @@ -185,7 +185,7 @@ struct _server_state { int mask; char is_revalidate; dict_t *dict; - struct flock flock; + struct gf_flock flock; const char *volume; dir_entry_t *entry; }; diff --git a/xlators/protocol/server/src/server3_1-fops.c b/xlators/protocol/server/src/server3_1-fops.c index f07be9bd7..1b0c407ee 100644 --- a/xlators/protocol/server/src/server3_1-fops.c +++ b/xlators/protocol/server/src/server3_1-fops.c @@ -172,7 +172,7 @@ out: int server_lk_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno, struct flock *lock) + int32_t op_ret, int32_t op_errno, struct gf_flock *lock) { gfs3_lk_rsp rsp = {0,}; rpcsvc_request_t *req = NULL; @@ -202,7 +202,7 @@ server_lk_cbk (call_frame_t *frame, void *cookie, xlator_t *this, break; } - gf_flock_from_flock (&rsp.flock, lock); + gf_proto_flock_from_flock (&rsp.flock, lock); } else if (op_errno != ENOSYS) { gf_log (this->name, GF_LOG_TRACE, "%"PRId64": LK %"PRId64" (%"PRId64") ==> %"PRId32" (%s)", @@ -4314,7 +4314,7 @@ server_inodelk (rpcsvc_request_t *req) state->type = args.type; state->volume = gf_strdup (args.volume); - gf_flock_to_flock (&args.flock, &state->flock); + gf_proto_flock_to_flock (&args.flock, &state->flock); switch (state->type) { case GF_LK_F_RDLCK: @@ -4385,7 +4385,7 @@ server_finodelk (rpcsvc_request_t *req) state->type = args.type; - gf_flock_to_flock (&args.flock, &state->flock); + gf_proto_flock_to_flock (&args.flock, &state->flock); switch (state->type) { case GF_LK_F_RDLCK: @@ -4820,7 +4820,7 @@ server_lk (rpcsvc_request_t *req) break; } - gf_flock_to_flock (&args.flock, &state->flock); + gf_proto_flock_to_flock (&args.flock, &state->flock); switch (state->type) { case GF_LK_F_RDLCK: |