Whamcloud - gitweb
LU-13814 osc: convert osc_dio_submit to array 59/52159/20
authorPatrick Farrell <pfarrell@whamcloud.com>
Tue, 29 Aug 2023 15:37:33 +0000 (11:37 -0400)
committerPatrick Farrell <pfarrell@whamcloud.com>
Tue, 26 Sep 2023 18:58:30 +0000 (14:58 -0400)
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 <pfarrell@whamcloud.com>
Change-Id: Ib208bc2ed2ad95602a5fde79a4b39652ff73d9bf

lustre/osc/osc_io.c

index b515187..bd504ff 100644 (file)
@@ -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;