diff options
Diffstat (limited to 'xlators/performance/read-ahead')
-rw-r--r-- | xlators/performance/read-ahead/src/page.c | 26 | ||||
-rw-r--r-- | xlators/performance/read-ahead/src/read-ahead.c | 12 | ||||
-rw-r--r-- | xlators/performance/read-ahead/src/read-ahead.h | 4 |
3 files changed, 21 insertions, 21 deletions
diff --git a/xlators/performance/read-ahead/src/page.c b/xlators/performance/read-ahead/src/page.c index a3506c8f0..1a7814049 100644 --- a/xlators/performance/read-ahead/src/page.c +++ b/xlators/performance/read-ahead/src/page.c @@ -129,7 +129,7 @@ ra_waitq_return (ra_waitq_t *waitq) int ra_fault_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, struct iovec *vector, - int32_t count, struct stat *stbuf) + int32_t count, struct stat *stbuf, struct iobref *iobref) { ra_local_t *local = NULL; off_t pending_offset = 0; @@ -173,13 +173,13 @@ ra_fault_cbk (call_frame_t *frame, void *cookie, xlator_t *this, } if (page->vector) { - dict_unref (page->ref); + iobref_unref (page->iobref); free (page->vector); } page->vector = iov_dup (vector, count); page->count = count; - page->ref = dict_ref (frame->root->rsp_refs); + page->iobref = iobref_ref (iobref); page->ready = 1; page->size = iov_length (vector, count); @@ -266,7 +266,7 @@ ra_frame_fill (ra_page_t *page, call_frame_t *frame) new->offset = page->offset; new->size = copy_size; - new->refs = dict_ref (page->ref); + new->iobref = iobref_ref (page->iobref); new->count = iov_subset (page->vector, page->count, src_offset, src_offset+copy_size, NULL); @@ -294,7 +294,7 @@ ra_frame_unwind (call_frame_t *frame) int32_t count = 0; struct iovec *vector; int32_t copied = 0; - dict_t *refs = NULL; + struct iobref *iobref = NULL; ra_fill_t *next = NULL; fd_t *fd = NULL; ra_file_t *file = NULL; @@ -304,7 +304,7 @@ ra_frame_unwind (call_frame_t *frame) local = frame->local; fill = local->fill.next; - refs = get_new_dict (); + iobref = iobref_new (); frame->local = NULL; @@ -324,28 +324,26 @@ ra_frame_unwind (call_frame_t *frame) fill->count * sizeof (*vector)); copied += (fill->count * sizeof (*vector)); - dict_copy (fill->refs, refs); + iobref_merge (iobref, fill->iobref); fill->next->prev = fill->prev; fill->prev->next = fill->prev; - dict_unref (fill->refs); + iobref_unref (fill->iobref); free (fill->vector); free (fill); fill = next; } - frame->root->rsp_refs = dict_ref (refs); - fd = local->fd; ret = fd_ctx_get (fd, frame->this, &tmp_file); file = (ra_file_t *)(long)tmp_file; STACK_UNWIND (frame, local->op_ret, local->op_errno, - vector, count, &file->stbuf); + vector, count, &file->stbuf, iobref); - dict_unref (refs); + iobref_unref (iobref); pthread_mutex_destroy (&local->local_lock); free (local); free (vector); @@ -413,8 +411,8 @@ ra_page_purge (ra_page_t *page) page->prev->next = page->next; page->next->prev = page->prev; - if (page->ref) { - dict_unref (page->ref); + if (page->iobref) { + iobref_unref (page->iobref); } free (page->vector); free (page); diff --git a/xlators/performance/read-ahead/src/read-ahead.c b/xlators/performance/read-ahead/src/read-ahead.c index aa825d486..39475d2c9 100644 --- a/xlators/performance/read-ahead/src/read-ahead.c +++ b/xlators/performance/read-ahead/src/read-ahead.c @@ -320,7 +320,7 @@ read_ahead (call_frame_t *frame, ra_file_t *file) int ra_need_atime_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, struct iovec *vector, - int32_t count, struct stat *stbuf) + int32_t count, struct stat *stbuf, struct iobref *iobref) { STACK_DESTROY (frame->root); return 0; @@ -409,9 +409,10 @@ dispatch_requests (call_frame_t *frame, int ra_readv_disabled_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, - struct iovec *vector, int32_t count, struct stat *stbuf) + struct iovec *vector, int32_t count, struct stat *stbuf, + struct iobref *iobref) { - STACK_UNWIND (frame, op_ret, op_errno, vector, count, stbuf); + STACK_UNWIND (frame, op_ret, op_errno, vector, count, stbuf, iobref); return 0; } @@ -590,7 +591,8 @@ 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 iovec *vector, int32_t count, off_t offset, + struct iobref *iobref) { ra_file_t *file = NULL; int ret = 0; @@ -611,7 +613,7 @@ ra_writev (call_frame_t *frame, xlator_t *this, fd_t *fd, STACK_WIND (frame, ra_writev_cbk, FIRST_CHILD(this), FIRST_CHILD(this)->fops->writev, - fd, vector, count, offset); + fd, vector, count, offset, iobref); return 0; } diff --git a/xlators/performance/read-ahead/src/read-ahead.h b/xlators/performance/read-ahead/src/read-ahead.h index d61b23c06..5513b2690 100644 --- a/xlators/performance/read-ahead/src/read-ahead.h +++ b/xlators/performance/read-ahead/src/read-ahead.h @@ -52,7 +52,7 @@ struct ra_fill { size_t size; struct iovec *vector; int32_t count; - dict_t *refs; + struct iobref *iobref; }; @@ -82,7 +82,7 @@ struct ra_page { off_t offset; size_t size; struct ra_waitq *waitq; - dict_t *ref; + struct iobref *iobref; }; |