From f00863ff25b3be68b220dd2c6b6234fd6e3a0d8e Mon Sep 17 00:00:00 2001 From: Patrick Farrell Date: Sun, 27 Oct 2024 23:56:46 -0400 Subject: [PATCH] LU-13814 clio: rename 'cl_page_completion' 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 Change-Id: I3f52372b4e9ae1805fdfddb31c908553a381c0aa Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52112 Reviewed-by: Andreas Dilger Reviewed-by: Qian Yingjin Reviewed-by: Marc Vef Reviewed-by: Oleg Drokin Tested-by: Maloo Tested-by: jenkins --- lustre/include/cl_object.h | 14 +++++++------- lustre/llite/vvp_page.c | 16 ++++++++-------- lustre/lov/lov_io.c | 4 ++-- lustre/obdclass/cl_page.c | 27 +++++++++++++-------------- lustre/osc/osc_cache.c | 6 +++--- 5 files changed, 33 insertions(+), 34 deletions(-) diff --git a/lustre/include/cl_object.h b/lustre/include/cl_object.h index fa75ffa..ba3cc6b 100644 --- a/lustre/include/cl_object.h +++ b/lustre/include/cl_object.h @@ -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, diff --git a/lustre/llite/vvp_page.c b/lustre/llite/vvp_page.c index c0dfa4e..1d6b21a 100644 --- a/lustre/llite/vvp_page.c +++ b/lustre/llite/vvp_page.c @@ -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, }, }, }; diff --git a/lustre/lov/lov_io.c b/lustre/lov/lov_io.c index 9fdff42..a76f621 100644 --- a/lustre/lov/lov_io.c +++ b/lustre/lov/lov_io.c @@ -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; } diff --git a/lustre/obdclass/cl_page.c b/lustre/obdclass/cl_page.c index f68e2e3..254eb8f 100644 --- a/lustre/obdclass/cl_page.c +++ b/lustre/obdclass/cl_page.c @@ -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 diff --git a/lustre/osc/osc_cache.c b/lustre/osc/osc_cache.c index 2401f3c..8078d57 100644 --- a/lustre/osc/osc_cache.c +++ b/lustre/osc/osc_cache.c @@ -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); -- 1.8.3.1