summaryrefslogtreecommitdiffstats
path: root/xlators/performance
diff options
context:
space:
mode:
authorshishir gowda <shishirng@gluster.com>2011-07-29 16:30:36 +0530
committerAnand Avati <avati@gluster.com>2011-07-31 23:15:15 -0700
commit76acac485b9f06f36d145b4c31fa6f4da3c70f52 (patch)
tree8d3bcc7f3cbb0e498f77a7d6998a9e7865a234ad /xlators/performance
parent9867f3954138e795123b4b308e256e641c55f3ec (diff)
IOBUF: Bring in variable iobuf support
Rebasing Raghavendra's patch to master Change-Id: Ie7a0c9a7b8e73cfe48c4573a5153460d5126208e BUG: 2472 Reviewed-on: http://review.gluster.com/12 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amar@gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
Diffstat (limited to 'xlators/performance')
-rw-r--r--xlators/performance/quick-read/src/quick-read.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/xlators/performance/quick-read/src/quick-read.c b/xlators/performance/quick-read/src/quick-read.c
index bd9b4741638..7e859501768 100644
--- a/xlators/performance/quick-read/src/quick-read.c
+++ b/xlators/performance/quick-read/src/quick-read.c
@@ -1183,8 +1183,8 @@ qr_readv (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
}
count = (op_ret
- / iobuf_pool->page_size);
- if ((op_ret % iobuf_pool->page_size)
+ / iobuf_pool->default_page_size);
+ if ((op_ret % iobuf_pool->default_page_size)
!= 0) {
count++;
}
@@ -1223,16 +1223,18 @@ qr_readv (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
start = offset
+
- (iobuf_pool->page_size
+ (iobuf_pool->default_page_size
* i);
if (start > end) {
len = 0;
} else {
- len = (iobuf_pool->page_size
+ len =
+ (iobuf_pool->default_page_size
> (end - start))
? (end - start)
- : iobuf_pool->page_size;
+ :
+ iobuf_pool->default_page_size;
memcpy (iobuf->ptr,
content->data