diff options
author | Amar Tumballi <amar@gluster.com> | 2012-02-06 17:49:14 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-02-14 01:09:02 -0800 |
commit | 0e6df0100e13123fe38f28c5a090777e894d8f52 (patch) | |
tree | 517c60cc953302172cb51f22f4b7aa52e557c1e9 /xlators/performance/write-behind | |
parent | e17ac220e4bff53fb89f5bea636acb61e347cf50 (diff) |
core: add an extra flag to readv()/writev() API
needed to implement a proper handling of open flag alterations
using fcntl() on fd.
Change-Id: Ic280d5db6f1dc0418d5c439abb8db1d3ac21ced0
Signed-off-by: Amar Tumballi <amar@gluster.com>
BUG: 782265
Reviewed-on: http://review.gluster.com/2723
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/performance/write-behind')
-rw-r--r-- | xlators/performance/write-behind/src/write-behind.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/xlators/performance/write-behind/src/write-behind.c b/xlators/performance/write-behind/src/write-behind.c index 52e03872026..7c666b40339 100644 --- a/xlators/performance/write-behind/src/write-behind.c +++ b/xlators/performance/write-behind/src/write-behind.c @@ -550,6 +550,7 @@ wb_sync (call_frame_t *frame, wb_file_t *file, list_head_t *winds) FIRST_CHILD(sync_frame->this)->fops->writev, fd, vector, count, first_request->stub->args.writev.off, + first_request->stub->args.writev.flags, iobref); iobref_unref (iobref); @@ -2071,7 +2072,7 @@ wb_writev_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t wb_writev (call_frame_t *frame, xlator_t *this, fd_t *fd, struct iovec *vector, - int32_t count, off_t offset, struct iobref *iobref) + int32_t count, off_t offset, uint32_t flags, struct iobref *iobref) { wb_file_t *file = NULL; char wb_disabled = 0; @@ -2139,7 +2140,7 @@ wb_writev (call_frame_t *frame, xlator_t *this, fd_t *fd, struct iovec *vector, if (wb_disabled) { STACK_WIND (frame, wb_writev_cbk, FIRST_CHILD (frame->this), FIRST_CHILD (frame->this)->fops->writev, - fd, vector, count, offset, iobref); + fd, vector, count, offset, flags, iobref); return 0; } @@ -2159,7 +2160,8 @@ wb_writev (call_frame_t *frame, xlator_t *this, fd_t *fd, struct iovec *vector, frame->local = local; local->file = file; - stub = fop_writev_stub (frame, NULL, fd, vector, count, offset, iobref); + stub = fop_writev_stub (frame, NULL, fd, vector, count, offset, flags, + iobref); if (stub == NULL) { op_errno = ENOMEM; goto unwind; @@ -2236,10 +2238,10 @@ wb_readv_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, static int32_t wb_readv_helper (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size, - off_t offset) + off_t offset, uint32_t flags) { STACK_WIND (frame, wb_readv_cbk, FIRST_CHILD(this), - FIRST_CHILD(this)->fops->readv, fd, size, offset); + FIRST_CHILD(this)->fops->readv, fd, size, offset, flags); return 0; } @@ -2247,7 +2249,7 @@ wb_readv_helper (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size, int32_t wb_readv (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size, - off_t offset) + off_t offset, uint32_t flags) { wb_file_t *file = NULL; wb_local_t *local = NULL; @@ -2286,7 +2288,7 @@ wb_readv (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size, frame->local = local; if (file) { stub = fop_readv_stub (frame, wb_readv_helper, fd, size, - offset); + offset, flags); if (stub == NULL) { op_errno = ENOMEM; goto unwind; @@ -2307,7 +2309,7 @@ wb_readv (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size, } else { STACK_WIND (frame, wb_readv_cbk, FIRST_CHILD(this), FIRST_CHILD(this)->fops->readv, - fd, size, offset); + fd, size, offset, flags); } return 0; |