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/read-ahead/src | |
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/read-ahead/src')
-rw-r--r-- | xlators/performance/read-ahead/src/page.c | 2 | ||||
-rw-r--r-- | xlators/performance/read-ahead/src/read-ahead.c | 12 |
2 files changed, 6 insertions, 8 deletions
diff --git a/xlators/performance/read-ahead/src/page.c b/xlators/performance/read-ahead/src/page.c index 0c9a61853..8aa55c065 100644 --- a/xlators/performance/read-ahead/src/page.c +++ b/xlators/performance/read-ahead/src/page.c @@ -278,7 +278,7 @@ ra_page_fault (ra_file_t *file, call_frame_t *frame, off_t offset) STACK_WIND (fault_frame, ra_fault_cbk, FIRST_CHILD (fault_frame->this), FIRST_CHILD (fault_frame->this)->fops->readv, - file->fd, file->page_size, offset); + file->fd, file->page_size, offset, 0); return; diff --git a/xlators/performance/read-ahead/src/read-ahead.c b/xlators/performance/read-ahead/src/read-ahead.c index b77715490..f58c4078d 100644 --- a/xlators/performance/read-ahead/src/read-ahead.c +++ b/xlators/performance/read-ahead/src/read-ahead.c @@ -449,7 +449,7 @@ dispatch_requests (call_frame_t *frame, ra_file_t *file) STACK_WIND (ra_frame, ra_need_atime_cbk, FIRST_CHILD (frame->this), FIRST_CHILD (frame->this)->fops->readv, - file->fd, 1, 1); + file->fd, 1, 1, 0); } out: @@ -473,7 +473,7 @@ ra_readv_disabled_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int ra_readv (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size, - off_t offset) + off_t offset, uint32_t flags) { ra_file_t *file = NULL; ra_local_t *local = NULL; @@ -561,7 +561,7 @@ disabled: STACK_WIND (frame, ra_readv_disabled_cbk, FIRST_CHILD (frame->this), FIRST_CHILD (frame->this)->fops->readv, - fd, size, offset); + fd, size, offset, flags); return 0; } @@ -666,7 +666,7 @@ ra_writev_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int ra_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) { ra_file_t *file = NULL; uint64_t tmp_file = 0; @@ -688,7 +688,7 @@ ra_writev (call_frame_t *frame, xlator_t *this, fd_t *fd, struct iovec *vector, STACK_WIND (frame, ra_writev_cbk, FIRST_CHILD(this), FIRST_CHILD(this)->fops->writev, - fd, vector, count, offset, iobref); + fd, vector, count, offset, flags, iobref); return 0; @@ -1030,12 +1030,10 @@ int init (xlator_t *this) { ra_conf_t *conf = NULL; - dict_t *options = NULL; int32_t ret = -1; GF_VALIDATE_OR_GOTO ("read-ahead", this, out); - options = this->options; if (!this->children || this->children->next) { gf_log (this->name, GF_LOG_ERROR, "FATAL: read-ahead not configured with exactly one" |