Whamcloud - gitweb
LU-13814 osc: convert osc_dio_submit to array 59/52159/36
authorPatrick Farrell <pfarrell@whamcloud.com>
Tue, 29 Aug 2023 15:37:33 +0000 (11:37 -0400)
committerOleg Drokin <green@whamcloud.com>
Sat, 7 Jun 2025 22:53:32 +0000 (22:53 +0000)
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 <pfarrell@whamcloud.com>
Change-Id: Ib208bc2ed2ad95602a5fde79a4b39652ff73d9bf
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52159
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Marc Vef <mvef@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
lustre/osc/osc_io.c

index 6ebc937..feb5e03 100644 (file)
@@ -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;