From ce6bcb9e53aa0f9c7e0593e16c31e88d4cd298aa Mon Sep 17 00:00:00 2001 From: Patrick Farrell Date: Tue, 29 Aug 2023 11:37:33 -0400 Subject: [PATCH] LU-13814 osc: convert osc_dio_submit to array This is a trivial first step, converting from list to the array of cl_pages, which is not a very useful step but does have to be done as we proceed here. Signed-off-by: Patrick Farrell Change-Id: Ib208bc2ed2ad95602a5fde79a4b39652ff73d9bf Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52159 Reviewed-by: Andreas Dilger Reviewed-by: Marc Vef Reviewed-by: Oleg Drokin Tested-by: Maloo Tested-by: jenkins --- lustre/osc/osc_io.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lustre/osc/osc_io.c b/lustre/osc/osc_io.c index 6ebc937..feb5e03 100644 --- a/lustre/osc/osc_io.c +++ b/lustre/osc/osc_io.c @@ -252,8 +252,6 @@ static int __osc_dio_submit(const struct lu_env *env, struct cl_io *io, struct cl_io *top_io = cl_io_top(io); struct client_obd *cli = osc_cli(osc); struct page *vmpage; - struct cl_page *page; - struct cl_page *tmp; LIST_HEAD(list); /* pages per chunk bits */ unsigned int ppc_bits = cli->cl_chunkbits - PAGE_SHIFT; @@ -263,6 +261,7 @@ static int __osc_dio_submit(const struct lu_env *env, struct cl_io *io, bool sync_queue = false; int result = 0; int brw_flags; + int i = 0; LASSERT(qin->pl_nr > 0); @@ -282,7 +281,8 @@ static int __osc_dio_submit(const struct lu_env *env, struct cl_io *io, * NOTE: here @page is a top-level page. This is done to avoid * creation of sub-page-list. */ - cl_page_list_for_each_safe(page, tmp, qin) { + for (i = 0; i < cdp->cdp_page_count; i++) { + struct cl_page *page = cdp->cdp_cl_pages[i]; struct osc_async_page *oap; struct osc_page *opg; -- 1.8.3.1