From: Patrick Farrell Date: Tue, 29 Aug 2023 15:37:33 +0000 (-0400) Subject: LU-13814 osc: convert osc_dio_submit to array X-Git-Tag: 2.16.56~32 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F59%2F52159%2F36;p=fs%2Flustre-release.git 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 --- 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;