Whamcloud - gitweb
LU-13814 clio: rename 'cl_page_completion' 12/52112/35
authorPatrick Farrell <pfarrell@whamcloud.com>
Mon, 28 Oct 2024 03:56:46 +0000 (23:56 -0400)
committerOleg Drokin <green@whamcloud.com>
Wed, 7 May 2025 21:10:41 +0000 (21:10 +0000)
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
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I3f52372b4e9ae1805fdfddb31c908553a381c0aa
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52112
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.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/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 fa75ffa..ba3cc6b 100644 (file)
@@ -914,10 +914,10 @@ struct cl_page_operations {
                 * are pinned in memory (and, hence, calling cl_page_put() is
                 * safe).
                 *
-                * \see cl_page_completion()
+                * \see cl_page_complete()
                 */
-               void (*cpo_completion)(const struct lu_env *env,
-                                      const struct cl_page_slice *slice,
+               void (*cpo_complete)(const struct lu_env *env,
+                                    const struct cl_page_slice *slice,
                                       int ioret);
        } io[CRT_NR];
        /**
@@ -2259,10 +2259,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 c0dfa4e..1d6b21a 100644 (file)
@@ -116,9 +116,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;
@@ -157,9 +157,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;
@@ -188,10 +188,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 9fdff42..a76f621 100644 (file)
@@ -1357,7 +1357,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;
                }
 
@@ -1447,7 +1447,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 f68e2e3..254eb8f 100644 (file)
@@ -1032,11 +1032,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);
@@ -1046,10 +1046,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.
@@ -1061,11 +1061,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;
@@ -1082,10 +1081,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);
                }
        }
 
@@ -1096,7 +1095,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 2401f3c..8078d57 100644 (file)
@@ -1330,10 +1330,10 @@ static int osc_completion(const struct lu_env *env, struct osc_object *osc,
         * reference counter protects page from concurrent reclaim.
         */
 
-       /* 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);