Whamcloud - gitweb
LU-13814 clio: rename 'cl_page_completion' 12/52112/21
authorPatrick Farrell <pfarrell@whamcloud.com>
Sun, 24 Sep 2023 20:58:45 +0000 (16:58 -0400)
committerPatrick Farrell <pfarrell@whamcloud.com>
Tue, 26 Sep 2023 18:58:30 +0000 (14:58 -0400)
All of the other cl_page operations are verbs, so let's
make this one a verb as well rather than the slightly odd
'completion'.

Test-Parameters: trivial
Test-Parameters: fortestonly
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I3f52372b4e9ae1805fdfddb31c908553a381c0aa

lustre/include/cl_object.h
lustre/llite/vvp_page.c
lustre/lov/lov_io.c
lustre/obdclass/cl_page.c
lustre/osc/osc_cache.c

index 9ebb95d..68bcc00 100644 (file)
@@ -917,22 +917,22 @@ struct cl_page_operations {
          *
          *         slice->cp_ops.io[req->crq_type].cpo_method(env, slice, ...);
          */
-        struct {
-                /**
-                 * Completion handler. This is guaranteed to be eventually
+       struct {
+               /**
+                * Completion handler. This is guaranteed to be eventually
                 * fired after cl_page_prep() or cl_page_make_ready() call.
-                 *
-                 * This method can be called in a non-blocking context. It is
-                 * guaranteed however, that the page involved and its object
-                 * are pinned in memory (and, hence, calling cl_page_put() is
-                 * safe).
-                 *
-                 * \see cl_page_completion()
+                *
+                * This method can be called in a non-blocking context. It is
+                * guaranteed however, that the page involved and its object
+                * are pinned in memory (and, hence, calling cl_page_put() is
+                * safe).
+                *
+                * \see cl_page_complete()
                  */
-                void (*cpo_completion)(const struct lu_env *env,
-                                       const struct cl_page_slice *slice,
-                                       int ioret);
-        } io[CRT_NR];
+                void (*cpo_complete)(const struct lu_env *env,
+                                     const struct cl_page_slice *slice,
+                                     int ioret);
+       } io[CRT_NR];
         /**
          * Tell transfer engine that only [to, from] part of a page should be
          * transmitted.
@@ -2286,10 +2286,10 @@ int  cl_page_is_owned   (const struct cl_page *pg, const struct cl_io *io);
 /** @{ */
 int cl_page_prep(const struct lu_env *env, struct cl_io *io,
                 struct cl_page *pg, enum cl_req_type crt);
-void cl_dio_pages_completion(const struct lu_env *env, struct cl_dio_pages *pg,
-                            int count, int ioret);
-void cl_page_completion(const struct lu_env *env,
-                       struct cl_page *pg, enum cl_req_type crt, int ioret);
+void cl_dio_pages_complete(const struct lu_env *env, struct cl_dio_pages *pg,
+                          int count, int ioret);
+void cl_page_complete(const struct lu_env *env, struct cl_page *pg,
+                     enum cl_req_type crt, int ioret);
 int cl_page_make_ready(const struct lu_env *env, struct cl_page *pg,
                       enum cl_req_type crt);
 void cl_page_clip(const struct lu_env *env, struct cl_page *pg, int from,
index 88eb189..38597a3 100644 (file)
@@ -128,9 +128,9 @@ static void vvp_vmpage_error(struct inode *inode, struct page *vmpage,
        }
 }
 
-static void vvp_page_completion_read(const struct lu_env *env,
-                                    const struct cl_page_slice *slice,
-                                    int ioret)
+static void vvp_page_complete_read(const struct lu_env *env,
+                                  const struct cl_page_slice *slice,
+                                  int ioret)
 {
        struct cl_page *cp = slice->cpl_page;
        struct page *vmpage = cp->cp_vmpage;
@@ -168,9 +168,9 @@ static void vvp_page_completion_read(const struct lu_env *env,
        EXIT;
 }
 
-static void vvp_page_completion_write(const struct lu_env *env,
-                                     const struct cl_page_slice *slice,
-                                     int ioret)
+static void vvp_page_complete_write(const struct lu_env *env,
+                                   const struct cl_page_slice *slice,
+                                   int ioret)
 {
        struct cl_page *cp = slice->cpl_page;
        struct page *vmpage = cp->cp_vmpage;
@@ -199,10 +199,10 @@ static const struct cl_page_operations vvp_page_ops = {
        .cpo_discard       = vvp_page_discard,
        .io = {
                [CRT_READ] = {
-                       .cpo_completion = vvp_page_completion_read,
+                       .cpo_complete = vvp_page_complete_read,
                },
                [CRT_WRITE] = {
-                       .cpo_completion = vvp_page_completion_write,
+                       .cpo_complete = vvp_page_complete_write,
                },
        },
 };
index ce9dd11..ede5f87 100644 (file)
@@ -1319,7 +1319,7 @@ static int lov_dio_submit(const struct lu_env *env,
                         * the return code of cl_page_prep() at all.
                         */
                        LASSERT(page->cp_type == CPT_TRANSIENT);
-                       cl_page_completion(env, page, crt, 0);
+                       cl_page_complete(env, page, crt, 0);
                        continue;
                }
 
@@ -1409,7 +1409,7 @@ static int lov_io_submit(const struct lu_env *env,
                         * the return code of cl_page_prep() at all.
                         */
                        LASSERT(page->cp_type == CPT_TRANSIENT);
-                       cl_page_completion(env, page, crt, 0);
+                       cl_page_complete(env, page, crt, 0);
                        continue;
                }
 
index 878e6c5..0c7b094 100644 (file)
@@ -1056,11 +1056,11 @@ out:
 }
 EXPORT_SYMBOL(cl_page_prep);
 
-/* this is the equivalent of cl_page_completion for a dio pages struct, but is
+/* this is the equivalent of cl_page_complete for a dio pages struct, but is
  * much simpler - in fact, it only needs to note the completion in the sync io
  */
-void cl_dio_pages_completion(const struct lu_env *env,
-                            struct cl_dio_pages *cdp, int count, int ioret)
+void cl_dio_pages_complete(const struct lu_env *env, struct cl_dio_pages *cdp,
+                          int count, int ioret)
 {
        struct cl_sub_dio *sdio = container_of(cdp, struct cl_sub_dio,
                                               csd_dio_pages);
@@ -1070,10 +1070,10 @@ void cl_dio_pages_completion(const struct lu_env *env,
 
        EXIT;
 }
-EXPORT_SYMBOL(cl_dio_pages_completion);
+EXPORT_SYMBOL(cl_dio_pages_complete);
 
 /**
- * Notify layers about transfer completion.
+ * Notify layers about transfer complete.
  *
  * Invoked by transfer sub-system (which is a part of osc) to notify layers
  * that a transfer, of which this page is a part of has completed.
@@ -1085,11 +1085,10 @@ EXPORT_SYMBOL(cl_dio_pages_completion);
  * \pre  cl_page->cp_state == CPS_PAGEIN || cl_page->cp_state == CPS_PAGEOUT
  * \post cl_page->cl_page_state == CPS_CACHED
  *
- * \see cl_page_operations::cpo_completion()
+ * \see cl_page_operations::cpo_complete()
  */
-void cl_page_completion(const struct lu_env *env,
-                       struct cl_page *cl_page, enum cl_req_type crt,
-                       int ioret)
+void cl_page_complete(const struct lu_env *env, struct cl_page *cl_page,
+                     enum cl_req_type crt, int ioret)
 {
        const struct cl_page_slice *slice;
        struct cl_sync_io *anchor = cl_page->cp_sync_io;
@@ -1106,10 +1105,10 @@ void cl_page_completion(const struct lu_env *env,
                cl_page_state_set(env, cl_page, CPS_CACHED);
 
                cl_page_slice_for_each_reverse(cl_page, slice, i) {
-                       if (slice->cpl_ops->io[crt].cpo_completion != NULL)
-                               (*slice->cpl_ops->io[crt].cpo_completion)(env,
-                                                                         slice,
-                                                                        ioret);
+                       if (slice->cpl_ops->io[crt].cpo_complete != NULL)
+                               (*slice->cpl_ops->io[crt].cpo_complete)(env,
+                                                                       slice,
+                                                                       ioret);
                }
        }
 
@@ -1120,7 +1119,7 @@ void cl_page_completion(const struct lu_env *env,
        }
        EXIT;
 }
-EXPORT_SYMBOL(cl_page_completion);
+EXPORT_SYMBOL(cl_page_complete);
 
 /**
  * Notify layers that transfer formation engine decided to yank this page from
index 2aad66b..38da575 100644 (file)
@@ -1340,10 +1340,10 @@ static int osc_completion(const struct lu_env *env, struct osc_object *osc,
         */
        lu_ref_del(&page->cp_reference, "transfer", page);
 
-       /* for transient pages, the last reference is destroyed by the
-        * cl_page_completion process, so do not referencce the page after this
+       /* for transient pages, the last reference can be destroyed by
+        * cl_page_complete, so do not reference the page after this
         */
-       cl_page_completion(env, page, crt, rc);
+       cl_page_complete(env, page, crt, rc);
        if (cptype != CPT_TRANSIENT)
                cl_page_put(env, page);