Whamcloud - gitweb
LU-10994 clio: Remove cl_2queue_add wrapper 51/47651/4
authorShivani Bhardwaj <shivanib134@gmail.com>
Mon, 27 Jun 2022 15:13:25 +0000 (11:13 -0400)
committerOleg Drokin <green@whamcloud.com>
Mon, 18 Jul 2022 20:25:11 +0000 (20:25 +0000)
Remove the wrapper function cl_2queue_add() and replace all its calls in
different files with the function it wrapped. Also, comments are added
wherever necessary to make the working of function clear. Prototype of
the function is also removed from the header file as it is no longer
needed.

Linux-commit: 53f1a12768a55e53b2c40e00a8804b1edfa739b3

Change-Id: Ic746c45e3dda9fdf3f1d2f8c6204d80fec5c058f
Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-on: https://review.whamcloud.com/47651
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/cl_object.h
lustre/llite/llite_lib.c
lustre/llite/rw.c
lustre/llite/rw26.c
lustre/obdclass/cl_io.c

index 60f5f44..cc62e05 100644 (file)
@@ -2498,8 +2498,6 @@ void cl_page_list_discard(const struct lu_env *env,
 void cl_page_list_fini(const struct lu_env *env, struct cl_page_list *plist);
 
 void cl_2queue_init(struct cl_2queue *queue);
 void cl_page_list_fini(const struct lu_env *env, struct cl_page_list *plist);
 
 void cl_2queue_init(struct cl_2queue *queue);
-void cl_2queue_add(struct cl_2queue *queue, struct cl_page *page,
-                  bool get_ref);
 void cl_2queue_disown(const struct lu_env *env, struct cl_2queue *queue);
 void cl_2queue_assume(const struct lu_env *env, struct cl_io *io,
                      struct cl_2queue *queue);
 void cl_2queue_disown(const struct lu_env *env, struct cl_2queue *queue);
 void cl_2queue_assume(const struct lu_env *env, struct cl_io *io,
                      struct cl_2queue *queue);
index 9fc44a8..e7bf4b2 100644 (file)
@@ -2070,7 +2070,7 @@ int ll_io_zero_page(struct inode *inode, pgoff_t index, pgoff_t offset,
                anchor = &vvp_env_info(env)->vti_anchor;
                cl_sync_io_init(anchor, 1);
                clpage->cp_sync_io = anchor;
                anchor = &vvp_env_info(env)->vti_anchor;
                cl_sync_io_init(anchor, 1);
                clpage->cp_sync_io = anchor;
-               cl_2queue_add(queue, clpage, true);
+               cl_page_list_add(&queue->c2_qin, clpage, true);
                rc = cl_io_submit_rw(env, io, CRT_WRITE, queue);
                if (rc)
                        GOTO(queuefini1, rc);
                rc = cl_io_submit_rw(env, io, CRT_WRITE, queue);
                if (rc)
                        GOTO(queuefini1, rc);
index b93ed5f..df1be3f 100644 (file)
@@ -1670,7 +1670,7 @@ int ll_io_read_page(const struct lu_env *env, struct cl_io *io,
                cl_sync_io_init(anchor, 1);
                page->cp_sync_io = anchor;
 
                cl_sync_io_init(anchor, 1);
                page->cp_sync_io = anchor;
 
-               cl_2queue_add(queue, page, true);
+               cl_page_list_add(&queue->c2_qin, page, true);
        }
 
        /* mmap does not set the ci_rw fields */
        }
 
        /* mmap does not set the ci_rw fields */
index 11c5a55..89d7891 100644 (file)
@@ -338,7 +338,7 @@ ll_direct_rw_pages(const struct lu_env *env, struct cl_io *io, size_t size,
                /* We keep the refcount from cl_page_find, so we don't need
                 * another one here
                 */
                /* We keep the refcount from cl_page_find, so we don't need
                 * another one here
                 */
-               cl_2queue_add(queue, page, false);
+               cl_page_list_add(&queue->c2_qin, page, false);
                /*
                 * Set page clip to tell transfer formation engine
                 * that page has to be sent even if it is beyond KMS.
                /*
                 * Set page clip to tell transfer formation engine
                 * that page has to be sent even if it is beyond KMS.
index 18468e1..dd6b66c 100644 (file)
@@ -1034,15 +1034,6 @@ void cl_2queue_init(struct cl_2queue *queue)
 EXPORT_SYMBOL(cl_2queue_init);
 
 /**
 EXPORT_SYMBOL(cl_2queue_init);
 
 /**
- * Add a page to the incoming page list of 2-queue.
- */
-void cl_2queue_add(struct cl_2queue *queue, struct cl_page *page, bool get_ref)
-{
-       cl_page_list_add(&queue->c2_qin, page, get_ref);
-}
-EXPORT_SYMBOL(cl_2queue_add);
-
-/**
  * Disown pages in both lists of a 2-queue.
  */
 void cl_2queue_disown(const struct lu_env *env, struct cl_2queue *queue)
  * Disown pages in both lists of a 2-queue.
  */
 void cl_2queue_disown(const struct lu_env *env, struct cl_2queue *queue)
@@ -1096,7 +1087,10 @@ void cl_2queue_init_page(struct cl_2queue *queue, struct cl_page *page)
 {
        ENTRY;
        cl_2queue_init(queue);
 {
        ENTRY;
        cl_2queue_init(queue);
-       cl_2queue_add(queue, page, true);
+       /*
+        * Add a page to the incoming page list of 2-queue.
+        */
+       cl_page_list_add(&queue->c2_qin, page, true);
        EXIT;
 }
 EXPORT_SYMBOL(cl_2queue_init_page);
        EXIT;
 }
 EXPORT_SYMBOL(cl_2queue_init_page);