diff options
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/mount/fuse/src/fuse-bridge.c | 2 | ||||
-rw-r--r-- | xlators/performance/quick-read/src/quick-read.c | 12 | ||||
-rw-r--r-- | xlators/protocol/client/src/client3_1-fops.c | 16 |
3 files changed, 16 insertions, 14 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c index 9fc491bb7..3b6a2ce2a 100644 --- a/xlators/mount/fuse/src/fuse-bridge.c +++ b/xlators/mount/fuse/src/fuse-bridge.c @@ -3108,7 +3108,7 @@ fuse_thread_proc (void *data) iov_in[0].iov_len = sizeof (*finh) + sizeof (struct fuse_write_in); iov_in[1].iov_len = ((struct iobuf_pool *)this->ctx->iobuf_pool) - ->page_size; + ->default_page_size; priv->msg0_len_p = &iov_in[0].iov_len; for (;;) { diff --git a/xlators/performance/quick-read/src/quick-read.c b/xlators/performance/quick-read/src/quick-read.c index bd9b47416..7e8595017 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 diff --git a/xlators/protocol/client/src/client3_1-fops.c b/xlators/protocol/client/src/client3_1-fops.c index 4790c790b..61dd3c1fb 100644 --- a/xlators/protocol/client/src/client3_1-fops.c +++ b/xlators/protocol/client/src/client3_1-fops.c @@ -2560,7 +2560,7 @@ client3_1_lookup (call_frame_t *frame, xlator_t *this, rsphdr = &vector[0]; rsphdr->iov_base = iobuf_ptr (rsp_iobuf); rsphdr->iov_len - = rsp_iobuf->iobuf_arena->iobuf_pool->page_size; + = iobuf_pagesize (rsp_iobuf); count = 1; rsp_iobuf = NULL; local->iobref = rsp_iobref; @@ -3521,7 +3521,7 @@ client3_1_readv (call_frame_t *frame, xlator_t *this, iobref_add (rsp_iobref, rsp_iobuf); iobuf_unref (rsp_iobuf); rsp_vec.iov_base = iobuf_ptr (rsp_iobuf); - rsp_vec.iov_len = rsp_iobuf->iobuf_arena->iobuf_pool->page_size; + rsp_vec.iov_len = iobuf_pagesize (rsp_iobuf); rsp_iobuf = NULL; @@ -4189,7 +4189,7 @@ client3_1_fgetxattr (call_frame_t *frame, xlator_t *this, iobuf_unref (rsp_iobuf); rsphdr = &vector[0]; rsphdr->iov_base = iobuf_ptr (rsp_iobuf); - rsphdr->iov_len = rsp_iobuf->iobuf_arena->iobuf_pool->page_size; + rsphdr->iov_len = iobuf_pagesize (rsp_iobuf);; count = 1; rsp_iobuf = NULL; local->iobref = rsp_iobref; @@ -4294,7 +4294,7 @@ client3_1_getxattr (call_frame_t *frame, xlator_t *this, iobuf_unref (rsp_iobuf); rsphdr = &vector[0]; rsphdr->iov_base = iobuf_ptr (rsp_iobuf); - rsphdr->iov_len = rsp_iobuf->iobuf_arena->iobuf_pool->page_size; + rsphdr->iov_len = iobuf_pagesize (rsp_iobuf); count = 1; rsp_iobuf = NULL; local->iobref = rsp_iobref; @@ -4416,7 +4416,7 @@ client3_1_xattrop (call_frame_t *frame, xlator_t *this, iobuf_unref (rsp_iobuf); rsphdr = &vector[0]; rsphdr->iov_base = iobuf_ptr (rsp_iobuf); - rsphdr->iov_len = rsp_iobuf->iobuf_arena->iobuf_pool->page_size; + rsphdr->iov_len = iobuf_pagesize (rsp_iobuf); count = 1; rsp_iobuf = NULL; local->iobref = rsp_iobref; @@ -4557,7 +4557,7 @@ client3_1_fxattrop (call_frame_t *frame, xlator_t *this, iobuf_unref (rsp_iobuf); rsphdr = &vector[0]; rsphdr->iov_base = iobuf_ptr (rsp_iobuf); - rsphdr->iov_len = rsp_iobuf->iobuf_arena->iobuf_pool->page_size; + rsphdr->iov_len = iobuf_pagesize (rsp_iobuf); count = 1; rsp_iobuf = NULL; local->iobref = rsp_iobref; @@ -5173,7 +5173,7 @@ client3_1_readdir (call_frame_t *frame, xlator_t *this, rsphdr = &vector[0]; rsphdr->iov_base = iobuf_ptr (rsp_iobuf); rsphdr->iov_len - = rsp_iobuf->iobuf_arena->iobuf_pool->page_size; + = iobuf_pagesize (rsp_iobuf); count = 1; rsp_iobuf = NULL; local->iobref = rsp_iobref; @@ -5291,7 +5291,7 @@ client3_1_readdirp (call_frame_t *frame, xlator_t *this, rsphdr = &vector[0]; rsphdr->iov_base = iobuf_ptr (rsp_iobuf); rsphdr->iov_len - = rsp_iobuf->iobuf_arena->iobuf_pool->page_size; + = iobuf_pagesize (rsp_iobuf); count = 1; rsp_iobuf = NULL; local->iobref = rsp_iobref; |