summaryrefslogtreecommitdiffstats
path: root/xlators/cluster
diff options
context:
space:
mode:
authorRaghavendra Gowdappa <rgowdapp@redhat.com>2018-11-16 16:27:17 +0530
committerRaghavendra G <rgowdapp@redhat.com>2018-11-28 15:11:59 +0000
commit18b6d7ce7d490e807815270918a17a4b392a829d (patch)
tree7ca2d0da54400db14fefc36663f360a06c4c2fc8 /xlators/cluster
parent9f9f46ff2d30ff87a6a4f8c2af491ea1aa92fbb2 (diff)
libglusterfs: rename macros roof and floor to not conflict with math.h
Change-Id: I666eeb63ebd000711b3f793b948d4e0c04b1a242 Signed-off-by: Raghavendra Gowdappa <rgowdapp@redhat.com> Updates: bz#1644629
Diffstat (limited to 'xlators/cluster')
-rw-r--r--xlators/cluster/stripe/src/stripe.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/xlators/cluster/stripe/src/stripe.c b/xlators/cluster/stripe/src/stripe.c
index 836bc680897..6010c1ed6c3 100644
--- a/xlators/cluster/stripe/src/stripe.c
+++ b/xlators/cluster/stripe/src/stripe.c
@@ -678,11 +678,11 @@ stripe_truncate(call_frame_t *frame, xlator_t *this, loc_t *loc, off_t offset,
* to the size of the previous stripe.
*/
if (i < eof_idx)
- tmp_offset = roof(offset,
- fctx->stripe_size * fctx->stripe_count);
+ tmp_offset = gf_roof(offset,
+ fctx->stripe_size * fctx->stripe_count);
else if (i > eof_idx)
- tmp_offset = floor(offset,
- fctx->stripe_size * fctx->stripe_count);
+ tmp_offset = gf_floor(offset,
+ fctx->stripe_size * fctx->stripe_count);
else
tmp_offset = offset;
@@ -2966,11 +2966,11 @@ stripe_ftruncate(call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset,
if (fctx->stripe_coalesce) {
if (i < eof_idx)
- tmp_offset = roof(offset,
- fctx->stripe_size * fctx->stripe_count);
+ tmp_offset = gf_roof(offset,
+ fctx->stripe_size * fctx->stripe_count);
else if (i > eof_idx)
- tmp_offset = floor(offset,
- fctx->stripe_size * fctx->stripe_count);
+ tmp_offset = gf_floor(offset,
+ fctx->stripe_size * fctx->stripe_count);
else
tmp_offset = offset;
@@ -3365,8 +3365,8 @@ stripe_readv(call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
* the file is in which child node. Always '0-<stripe_size>' part of
* the file resides in the first child.
*/
- rounded_start = floor(offset, stripe_size);
- rounded_end = roof(offset + size, stripe_size);
+ rounded_start = gf_floor(offset, stripe_size);
+ rounded_end = gf_roof(offset + size, stripe_size);
num_stripe = (rounded_end - rounded_start) / stripe_size;
local = mem_get0(this->local_pool);
@@ -3399,7 +3399,8 @@ stripe_readv(call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
goto err;
}
- frame_size = min(roof(frame_offset + 1, stripe_size), (offset + size)) -
+ frame_size = min(gf_roof(frame_offset + 1, stripe_size),
+ (offset + size)) -
frame_offset;
rlocal->node_index = index - off_index;
@@ -3581,8 +3582,8 @@ stripe_writev(call_frame_t *frame, xlator_t *this, fd_t *fd,
goto err;
}
- rounded_start = floor(offset, stripe_size);
- rounded_end = roof(offset + total_size, stripe_size);
+ rounded_start = gf_floor(offset, stripe_size);
+ rounded_end = gf_roof(offset + total_size, stripe_size);
total_chunks = (rounded_end - rounded_start) / stripe_size;
local->replies = GF_CALLOC(total_chunks, sizeof(struct stripe_replies),
gf_stripe_mt_stripe_replies);