From e4b3c0d90c46e6dde97f57fa93ed215b0d34e0c4 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Thu, 12 Apr 2012 17:52:10 +0530 Subject: 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 BUG: 812784 Reviewed-on: http://review.gluster.com/3136 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- xlators/storage/posix/src/posix.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'xlators/storage') 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); -- cgit