From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Vladimir Davydov Subject: [PATCH 2/5] vinyl: pass page info by reference to reader thread Date: Wed, 29 May 2019 18:12:48 +0300 Message-Id: In-Reply-To: References: In-Reply-To: References: To: tarantool-patches@freelists.org List-ID: Since a page read task references the source run file, we don't need to pass page info by value. --- src/box/vy_run.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/box/vy_run.c b/src/box/vy_run.c index 84e0f50b..5b990992 100644 --- a/src/box/vy_run.c +++ b/src/box/vy_run.c @@ -92,7 +92,7 @@ struct vy_page_read_task { /** parent */ struct cbus_call_msg base; /** vinyl page metadata */ - struct vy_page_info page_info; + struct vy_page_info *page_info; /** vy_run with fd - ref. counted */ struct vy_run *run; /** [out] resulting vinyl page */ @@ -944,7 +944,7 @@ vy_page_read_cb(struct cbus_call_msg *base) ZSTD_DStream *zdctx = vy_env_get_zdctx(task->run->env); if (zdctx == NULL) return -1; - return vy_page_read(task->page, &task->page_info, task->run, zdctx); + return vy_page_read(task->page, task->page_info, task->run, zdctx); } /** @@ -1014,7 +1014,7 @@ vy_run_iterator_load_page(struct vy_run_iterator *itr, uint32_t page_no, env->next_reader %= env->reader_pool_size; task->run = slice->run; - task->page_info = *page_info; + task->page_info = page_info; task->page = page; vy_run_ref(task->run); -- 2.11.0