summaryrefslogtreecommitdiffstats
path: root/xlators/cluster
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/cluster
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/cluster')
-rw-r--r--xlators/cluster/afr/src/afr-common.c10
-rw-r--r--xlators/cluster/afr/src/afr-lk-common.c26
-rw-r--r--xlators/cluster/afr/src/afr.h6
-rw-r--r--xlators/cluster/dht/src/dht-common.c8
-rw-r--r--xlators/cluster/ha/src/ha.c12
-rw-r--r--xlators/cluster/map/src/map.c8
-rw-r--r--xlators/cluster/stripe/src/stripe.c4
-rw-r--r--xlators/cluster/stripe/src/stripe.h2
-rw-r--r--xlators/cluster/unify/src/unify.c8
9 files changed, 42 insertions, 42 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c
index e5a7e87c72f..ee5fa3a606e 100644
--- a/xlators/cluster/afr/src/afr-common.c
+++ b/xlators/cluster/afr/src/afr-common.c
@@ -1871,7 +1871,7 @@ afr_inodelk_cbk (call_frame_t *frame, void *cookie,
int32_t
afr_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)
{
afr_private_t *priv = NULL;
afr_local_t *local = NULL;
@@ -1953,7 +1953,7 @@ afr_finodelk_cbk (call_frame_t *frame, void *cookie,
int32_t
afr_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)
{
afr_private_t *priv = NULL;
afr_local_t *local = NULL;
@@ -2264,7 +2264,7 @@ out:
int32_t
afr_lk_unlock_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)
{
afr_local_t * local = NULL;
@@ -2325,7 +2325,7 @@ afr_lk_unlock (call_frame_t *frame, xlator_t *this)
int32_t
afr_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)
{
afr_local_t *local = NULL;
afr_private_t *priv = NULL;
@@ -2391,7 +2391,7 @@ afr_lk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int
afr_lk (call_frame_t *frame, xlator_t *this,
fd_t *fd, int32_t cmd,
- struct flock *flock)
+ struct gf_flock *flock)
{
afr_private_t *priv = NULL;
afr_local_t *local = NULL;
diff --git a/xlators/cluster/afr/src/afr-lk-common.c b/xlators/cluster/afr/src/afr-lk-common.c
index 12050af1d35..06f35597429 100644
--- a/xlators/cluster/afr/src/afr-lk-common.c
+++ b/xlators/cluster/afr/src/afr-lk-common.c
@@ -120,7 +120,7 @@ internal_lock_count (call_frame_t *frame, xlator_t *this,
static void
afr_print_inodelk (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;
@@ -247,7 +247,7 @@ afr_set_lock_call_type (afr_lock_call_type_t lock_call_type,
static void
afr_trace_inodelk_out (call_frame_t *frame, afr_lock_call_type_t lock_call_type,
- afr_lock_op_type_t lk_op_type, struct flock *flock,
+ afr_lock_op_type_t lk_op_type, struct gf_flock *flock,
int op_ret, int op_errno, int32_t child_index)
{
xlator_t *this = NULL;
@@ -286,7 +286,7 @@ afr_trace_inodelk_out (call_frame_t *frame, afr_lock_call_type_t lock_call_type,
static void
afr_trace_inodelk_in (call_frame_t *frame, afr_lock_call_type_t lock_call_type,
- afr_lock_op_type_t lk_op_type, struct flock *flock,
+ afr_lock_op_type_t lk_op_type, struct gf_flock *flock,
int32_t cmd, int32_t child_index)
{
xlator_t *this = NULL;
@@ -578,7 +578,7 @@ afr_unlock_inodelk (call_frame_t *frame, xlator_t *this)
afr_local_t *local = NULL;
afr_private_t *priv = NULL;
- struct flock flock;
+ struct gf_flock flock;
int call_count = 0;
int i = 0;
@@ -908,7 +908,7 @@ afr_lock_blocking (call_frame_t *frame, xlator_t *this, int child_index)
const char *lower_name = NULL;
const char *higher_name = NULL;
- struct flock flock;
+ struct gf_flock flock;
uint64_t ctx;
int ret = 0;
@@ -1360,7 +1360,7 @@ afr_nonblocking_inodelk (call_frame_t *frame, xlator_t *this)
uint64_t ctx = 0;
int i = 0;
int ret = 0;
- struct flock flock;
+ struct gf_flock flock;
local = frame->local;
int_lock = &local->internal_lock;
@@ -1836,15 +1836,15 @@ out:
int32_t
afr_get_locks_fd_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);
int32_t
afr_recover_lock_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)
{
afr_local_t *local = NULL;
afr_private_t *priv = NULL;
int32_t source_child = 0;
- struct flock flock = {0,};
+ struct gf_flock flock = {0,};
if (op_ret) {
gf_log (this->name, GF_LOG_DEBUG,
@@ -1871,7 +1871,7 @@ cleanup:
int
afr_recover_lock (call_frame_t *frame, xlator_t *this,
- struct flock *flock)
+ struct gf_flock *flock)
{
afr_local_t *local = NULL;
afr_private_t *priv = NULL;
@@ -1892,7 +1892,7 @@ afr_recover_lock (call_frame_t *frame, xlator_t *this,
}
static int
-is_afr_lock_eol (struct flock *lock)
+is_afr_lock_eol (struct gf_flock *lock)
{
int ret = 0;
@@ -1904,7 +1904,7 @@ is_afr_lock_eol (struct flock *lock)
int32_t
afr_get_locks_fd_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)
{
if (op_ret) {
gf_log (this->name, GF_LOG_DEBUG,
@@ -1939,7 +1939,7 @@ afr_lock_recovery (call_frame_t *frame, xlator_t *this)
fd_t *fd = NULL;
int ret = 0;
int32_t source_child = 0;
- struct flock flock = {0,};
+ struct gf_flock flock = {0,};
priv = this->private;
local = frame->local;
diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h
index 005847b412f..ed50fdfbfd2 100644
--- a/xlators/cluster/afr/src/afr.h
+++ b/xlators/cluster/afr/src/afr.h
@@ -235,7 +235,7 @@ afr_index_for_transaction_type (afr_transaction_type type)
typedef struct {
loc_t *lk_loc;
- struct flock lk_flock;
+ struct gf_flock lk_flock;
const char *lk_basename;
const char *lower_basename;
@@ -347,8 +347,8 @@ typedef struct _afr_local {
struct {
int32_t cmd;
- struct flock user_flock;
- struct flock ret_flock;
+ struct gf_flock user_flock;
+ struct gf_flock ret_flock;
unsigned char *locked_nodes;
} lk;
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
index 2c8a535477c..0a39084a177 100644
--- a/xlators/cluster/dht/src/dht-common.c
+++ b/xlators/cluster/dht/src/dht-common.c
@@ -2350,7 +2350,7 @@ err:
int
dht_lk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int op_ret, int op_errno, struct flock *flock)
+ int op_ret, int op_errno, struct gf_flock *flock)
{
DHT_STACK_UNWIND (lk, frame, op_ret, op_errno, flock);
@@ -2360,7 +2360,7 @@ dht_lk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int
dht_lk (call_frame_t *frame, xlator_t *this,
- fd_t *fd, int cmd, struct flock *flock)
+ fd_t *fd, int cmd, struct gf_flock *flock)
{
xlator_t *subvol = NULL;
int op_errno = -1;
@@ -4287,7 +4287,7 @@ dht_inodelk_cbk (call_frame_t *frame, void *cookie,
int32_t
dht_inodelk (call_frame_t *frame, xlator_t *this,
- const char *volume, loc_t *loc, int32_t cmd, struct flock *lock)
+ const char *volume, loc_t *loc, int32_t cmd, struct gf_flock *lock)
{
xlator_t *subvol = NULL;
int op_errno = -1;
@@ -4346,7 +4346,7 @@ dht_finodelk_cbk (call_frame_t *frame, void *cookie,
int
dht_finodelk (call_frame_t *frame, xlator_t *this,
- const char *volume, fd_t *fd, int32_t cmd, struct flock *lock)
+ const char *volume, fd_t *fd, int32_t cmd, struct gf_flock *lock)
{
xlator_t *subvol = NULL;
int op_errno = -1;
diff --git a/xlators/cluster/ha/src/ha.c b/xlators/cluster/ha/src/ha.c
index 54b41858eee..a8dd5c724d2 100644
--- a/xlators/cluster/ha/src/ha.c
+++ b/xlators/cluster/ha/src/ha.c
@@ -3066,7 +3066,7 @@ ha_lk_setlk_unlck_cbk (call_frame_t *frame,
xlator_t *this,
int32_t op_ret,
int32_t op_errno,
- struct flock *lock)
+ struct gf_flock *lock)
{
ha_local_t *local = NULL;
int cnt = 0;
@@ -3099,7 +3099,7 @@ ha_lk_setlk_cbk (call_frame_t *frame,
xlator_t *this,
int32_t op_ret,
int32_t op_errno,
- struct flock *lock)
+ struct gf_flock *lock)
{
ha_local_t *local = NULL;
ha_private_t *pvt = NULL;
@@ -3155,7 +3155,7 @@ ha_lk_setlk_cbk (call_frame_t *frame,
cnt++;
}
if (cnt) {
- struct flock lock;
+ struct gf_flock lock;
lock = local->stub->args.lk.lock;
for (i = 0; i < child_count; i++) {
if (state[i]) {
@@ -3189,7 +3189,7 @@ ha_lk_getlk_cbk (call_frame_t *frame,
xlator_t *this,
int32_t op_ret,
int32_t op_errno,
- struct flock *lock)
+ struct gf_flock *lock)
{
ha_local_t *local = NULL;
ha_private_t *pvt = NULL;
@@ -3244,7 +3244,7 @@ ha_lk (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
int32_t cmd,
- struct flock *lock)
+ struct gf_flock *lock)
{
ha_local_t *local = NULL;
ha_private_t *pvt = NULL;
@@ -3378,7 +3378,7 @@ ha_inodelk (call_frame_t *frame,
const char *volume,
loc_t *loc,
int32_t cmd,
- struct flock *lock)
+ struct gf_flock *lock)
{
ha_local_t *local = NULL;
int op_errno = 0;
diff --git a/xlators/cluster/map/src/map.c b/xlators/cluster/map/src/map.c
index dd89d0ebee9..df650db86d5 100644
--- a/xlators/cluster/map/src/map.c
+++ b/xlators/cluster/map/src/map.c
@@ -438,7 +438,7 @@ map_lk_cbk (call_frame_t *frame,
xlator_t *this,
int32_t op_ret,
int32_t op_errno,
- struct flock *lock)
+ struct gf_flock *lock)
{
STACK_UNWIND (frame, op_ret, op_errno, lock);
return 0;
@@ -1770,7 +1770,7 @@ map_lk (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
int32_t cmd,
- struct flock *lock)
+ struct gf_flock *lock)
{
int32_t op_errno = 1;
xlator_t *subvol = NULL;
@@ -1799,7 +1799,7 @@ map_lk (call_frame_t *frame,
int32_t
map_inodelk (call_frame_t *frame, xlator_t *this,
- const char *volume, loc_t *loc, int32_t cmd, struct flock *lock)
+ const char *volume, loc_t *loc, int32_t cmd, struct gf_flock *lock)
{
int32_t op_errno = 1;
xlator_t *subvol = NULL;
@@ -1829,7 +1829,7 @@ map_inodelk (call_frame_t *frame, xlator_t *this,
int32_t
map_finodelk (call_frame_t *frame, xlator_t *this,
- const char *volume, fd_t *fd, int32_t cmd, struct flock *lock)
+ const char *volume, fd_t *fd, int32_t cmd, struct gf_flock *lock)
{
int32_t op_errno = 1;
xlator_t *subvol = NULL;
diff --git a/xlators/cluster/stripe/src/stripe.c b/xlators/cluster/stripe/src/stripe.c
index 00c888f68dd..72c7b4515e2 100644
--- a/xlators/cluster/stripe/src/stripe.c
+++ b/xlators/cluster/stripe/src/stripe.c
@@ -2566,7 +2566,7 @@ err:
int32_t
stripe_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)
{
int32_t callcnt = 0;
stripe_local_t *local = NULL;
@@ -2614,7 +2614,7 @@ out:
int32_t
stripe_lk (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t cmd,
- struct flock *lock)
+ struct gf_flock *lock)
{
stripe_local_t *local = NULL;
xlator_list_t *trav = NULL;
diff --git a/xlators/cluster/stripe/src/stripe.h b/xlators/cluster/stripe/src/stripe.h
index 8afc6aa9a58..a17912908ad 100644
--- a/xlators/cluster/stripe/src/stripe.h
+++ b/xlators/cluster/stripe/src/stripe.h
@@ -147,7 +147,7 @@ struct stripe_local {
int entry_self_heal_needed;
int8_t *list;
- struct flock lock;
+ struct gf_flock lock;
fd_t *fd;
void *value;
struct iobref *iobref;
diff --git a/xlators/cluster/unify/src/unify.c b/xlators/cluster/unify/src/unify.c
index e50d3274f3b..c307de6f4f0 100644
--- a/xlators/cluster/unify/src/unify.c
+++ b/xlators/cluster/unify/src/unify.c
@@ -2644,7 +2644,7 @@ unify_lk_cbk (call_frame_t *frame,
xlator_t *this,
int32_t op_ret,
int32_t op_errno,
- struct flock *lock)
+ struct gf_flock *lock)
{
STACK_UNWIND (frame, op_ret, op_errno, lock);
return 0;
@@ -2658,7 +2658,7 @@ unify_lk (call_frame_t *frame,
xlator_t *this,
fd_t *fd,
int32_t cmd,
- struct flock *lock)
+ struct gf_flock *lock)
{
UNIFY_CHECK_FD_CTX_AND_UNWIND_ON_ERR (fd);
xlator_t *child = NULL;
@@ -3999,7 +3999,7 @@ unify_finodelk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
*/
int
unify_finodelk (call_frame_t *frame, xlator_t *this,
- const char *volume, fd_t *fd, int cmd, struct flock *flock)
+ const char *volume, fd_t *fd, int cmd, struct gf_flock *flock)
{
UNIFY_CHECK_FD_CTX_AND_UNWIND_ON_ERR (fd);
xlator_t *child = NULL;
@@ -4103,7 +4103,7 @@ unify_inodelk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
*/
int
unify_inodelk (call_frame_t *frame, xlator_t *this,
- const char *volume, loc_t *loc, int cmd, struct flock *flock)
+ const char *volume, loc_t *loc, int cmd, struct gf_flock *flock)
{
xlator_t *child = NULL;