summaryrefslogtreecommitdiffstats
path: root/xlators/features/bit-rot/src/bitd/bit-rot.c
diff options
context:
space:
mode:
authorKaleb S KEITHLEY <kkeithle@redhat.com>2015-11-18 12:28:42 -0500
committerNiels de Vos <ndevos@redhat.com>2016-01-18 01:02:34 -0800
commit50ae3e67e4f294925fc840d3f83b77f7072af54d (patch)
treed682399e0b506b09d3106ea69c0518ea6cd8e0d8 /xlators/features/bit-rot/src/bitd/bit-rot.c
parentf3e03c9d47b7438a6f124e01e2f459c2b72b1c29 (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. backport of Change-Id: I56a5e614735c9e0a6ee420dab949eac22e25c155, http://review.gluster.org/11769, BUG: 1245331 Change-Id: Iba1efb0bc578ea4a5e9bf76b7bd93dc1be9eba44 BUG: 1283302 Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/12646 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@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 9ec2e42bbf6..0eba4472a33 100644
--- a/xlators/features/bit-rot/src/bitd/bit-rot.c
+++ b/xlators/features/bit-rot/src/bitd/bit-rot.c
@@ -123,7 +123,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)
@@ -186,7 +186,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)
{
@@ -234,7 +234,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)
{
@@ -377,14 +377,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)
{
@@ -457,7 +457,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));
@@ -567,7 +567,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;
@@ -636,7 +636,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;
@@ -724,7 +724,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;
@@ -746,7 +746,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)
{
@@ -877,17 +877,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;
@@ -1716,7 +1706,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;
@@ -1728,7 +1718,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;