summaryrefslogtreecommitdiffstats
path: root/xlators/storage/posix
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2012-04-12 17:52:10 +0530
committerAnand Avati <avati@redhat.com>2012-05-03 21:54:54 -0700
commite4b3c0d90c46e6dde97f57fa93ed215b0d34e0c4 (patch)
tree60b39fe288a35f419ec874931451ecde333a5f0a /xlators/storage/posix
parentd879951ca9e69632517cf13f8f8773c330c14165 (diff)
iobuf: option to provide larger size of buffers
provide an option to failover to standard allocation if iobuf of required size doesn't exists. this can be achieved by keeping an arena dedicated for all the out of boundary allocations. Change-Id: I41a2bd7d353dc7bcb2e1a6e4b41735afe9865975 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 812784 Reviewed-on: http://review.gluster.com/3136 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/storage/posix')
-rw-r--r--xlators/storage/posix/src/posix.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index b92ab19e616..f9805628689 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -1890,9 +1890,6 @@ out:
return 0;
}
-#define ALIGN_BUF(ptr,bound) ((void *)((unsigned long)(ptr + bound - 1) & \
- (unsigned long)(~(bound - 1))))
-
int
posix_readv (call_frame_t *frame, xlator_t *this,
fd_t *fd, size_t size, off_t offset, uint32_t flags, dict_t *xdata)
@@ -2055,7 +2052,7 @@ __posix_writev (int fd, struct iovec *vector, int count, off_t startoff,
internal_off = startoff;
for (idx = 0; idx < count; idx++) {
/* page aligned buffer */
- buf = ALIGN_BUF (alloc_buf, align);
+ buf = GF_ALIGN_BUF (alloc_buf, align);
memcpy (buf, vector[idx].iov_base, vector[idx].iov_len);