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/protocol/legacy | |
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/protocol/legacy')
5 files changed, 10 insertions, 10 deletions
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; }; |