From 115ebe1b4f9af4e62e1447feb13dba6fbb38a857 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. Test-Parameters: fortestonly Test-Parameters: forjanitoronly Signed-off-by: Patrick Farrell Change-Id: Ib208bc2ed2ad95602a5fde79a4b39652ff73d9bf --- 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 b515187..bd504ff 100644 --- a/lustre/osc/osc_io.c +++ b/lustre/osc/osc_io.c @@ -269,8 +269,6 @@ 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; @@ -280,6 +278,7 @@ 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); @@ -299,7 +298,8 @@ 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_count; i++) { + struct cl_page *page = cdp->cdp_cl_pages[i]; struct osc_async_page *oap; struct osc_page *opg; -- 1.8.3.1