summaryrefslogtreecommitdiffstats
path: root/xlators/features/bit-rot/src/bitd/bit-rot.c
diff options
context:
space:
mode:
authorJeff Darcy <jdarcy@redhat.com>2015-07-28 12:11:12 -0400
committerJeff Darcy <jdarcy@redhat.com>2015-09-01 04:55:15 -0700
commit0773ca67fdb60a142207759fa6c07a69882ce59c (patch)
tree027101fce644fe17e58c78321b1632f38aaed166 /xlators/features/bit-rot/src/bitd/bit-rot.c
parent038dfe57cf0c5944b0392332dbf5a00bb1208150 (diff)
all: reduce "inline" usage
There are three kinds of inline functions: plain inline, extern inline, and static inline. All three have been removed from .c files, except those in "contrib" which aren't our problem. Inlines in .h files, which are overwhelmingly "static inline" already, have generally been left alone. Over time we should be able to "lower" these into .c files, but that has to be done in a case-by-case fashion requiring more manual effort. This part was easy to do automatically without (as far as I can tell) any ill effect. In the process, several pieces of dead code were flagged by the compiler, and were removed. Change-Id: I56a5e614735c9e0a6ee420dab949eac22e25c155 BUG: 1245331 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/11769 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com>
Diffstat (limited to 'xlators/features/bit-rot/src/bitd/bit-rot.c')
-rw-r--r--xlators/features/bit-rot/src/bitd/bit-rot.c36
1 files changed, 13 insertions, 23 deletions
diff --git a/xlators/features/bit-rot/src/bitd/bit-rot.c b/xlators/features/bit-rot/src/bitd/bit-rot.c
index d9874660781..d6ae5e2fdd2 100644
--- a/xlators/features/bit-rot/src/bitd/bit-rot.c
+++ b/xlators/features/bit-rot/src/bitd/bit-rot.c
@@ -118,7 +118,7 @@ br_brick_fini (void *xl, char *brick, void *data)
* FIX: Send the string length as part of the signature struct and
* change stub to handle this change.
*/
-static inline br_isignature_t *
+static br_isignature_t *
br_prepare_signature (const unsigned char *sign,
unsigned long hashlen,
int8_t hashtype, br_object_t *object)
@@ -181,7 +181,7 @@ out:
/**
* Do a lookup on the gfid present within the object.
*/
-static inline int32_t
+static int32_t
br_object_lookup (xlator_t *this, br_object_t *object,
struct iatt *iatt, inode_t **linked_inode)
{
@@ -229,7 +229,7 @@ out:
* know that open is being done by bitd because syncop framework does not allow
* passing xdata -- may be use frame->root->pid itself.
*/
-static inline int32_t
+static int32_t
br_object_open (xlator_t *this,
br_object_t *object, inode_t *inode, fd_t **openfd)
{
@@ -372,14 +372,14 @@ br_calculate_obj_checksum (unsigned char *md,
return ret;
}
-static inline int32_t
+static int32_t
br_object_checksum (unsigned char *md,
br_object_t *object, fd_t *fd, struct iatt *iatt)
{
return br_calculate_obj_checksum (md, object->child, fd, iatt);
}
-static inline int32_t
+static int32_t
br_object_read_sign (inode_t *linked_inode, fd_t *fd, br_object_t *object,
struct iatt *iatt)
{
@@ -452,7 +452,7 @@ br_object_read_sign (inode_t *linked_inode, fd_t *fd, br_object_t *object,
return ret;
}
-static inline int br_object_sign_softerror (int32_t op_errno)
+static int br_object_sign_softerror (int32_t op_errno)
{
return ((op_errno == ENOENT) || (op_errno == ESTALE)
|| (op_errno == ENODATA));
@@ -562,7 +562,7 @@ br_object_resign (xlator_t *this,
* some form of priority scheduling and/or read burstness to avoid starving
* (or kicking) client I/O's.
*/
-static inline int32_t br_sign_object (br_object_t *object)
+static int32_t br_sign_object (br_object_t *object)
{
int32_t ret = -1;
inode_t *linked_inode = NULL;
@@ -631,7 +631,7 @@ static inline int32_t br_sign_object (br_object_t *object)
return ret;
}
-static inline br_object_t *__br_pick_object (br_private_t *priv)
+static br_object_t *__br_pick_object (br_private_t *priv)
{
br_object_t *object = NULL;
@@ -719,7 +719,7 @@ br_add_object_to_queue (struct gf_tw_timer_list *timer,
return;
}
-static inline br_object_t *
+static br_object_t *
br_initialize_object (xlator_t *this, br_child_t *child, changelog_event_t *ev)
{
br_object_t *object = NULL;
@@ -741,7 +741,7 @@ out:
return object;
}
-static inline struct gf_tw_timer_list *
+static struct gf_tw_timer_list *
br_initialize_timer (xlator_t *this, br_object_t *object, br_child_t *child,
changelog_event_t *ev)
{
@@ -872,17 +872,7 @@ br_fill_brick_spec (struct gf_brick_spec *brick, char *path)
brick->disconnected = NULL;
}
-static inline gf_boolean_t
-br_time_equal (br_child_t *child, struct timeval *tv)
-{
- if ((child->tv.tv_sec == tv->tv_sec) &&
- (child->tv.tv_usec == tv->tv_usec))
- return _gf_true;
-
- return _gf_false;
-}
-
-static inline gf_boolean_t
+static gf_boolean_t
br_check_object_need_sign (xlator_t *this, dict_t *xattr, br_child_t *child)
{
int32_t ret = -1;
@@ -1641,7 +1631,7 @@ notify (xlator_t *this, int32_t event, void *data, ...)
* Initialize signer specific structures, spawn worker threads.
*/
-static inline void
+static void
br_fini_signer (xlator_t *this, br_private_t *priv)
{
int i = 0;
@@ -1653,7 +1643,7 @@ br_fini_signer (xlator_t *this, br_private_t *priv)
pthread_cond_destroy (&priv->object_cond);
}
-static inline int32_t
+static int32_t
br_init_signer (xlator_t *this, br_private_t *priv)
{
int i = 0;