Whamcloud - gitweb
EX-8353 csdc: rename "cp_comp_*" to "cp_compr_*"
authorJian Yu <yujian@whamcloud.com>
Wed, 17 Jan 2024 01:10:58 +0000 (17:10 -0800)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 18 Jan 2024 09:28:18 +0000 (09:28 +0000)
This patch renames "cp_comp_type", "cp_comp_level",
and "cp_chunk_log_bits" to use "compr" in the name
to be consistent with other variable names.

Test-Parameters: trivial

Change-Id: I428ff3a789b33da02832dee02f316b02d97137e2
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/52761
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
contrib/scripts/spelling.txt
lustre/include/cl_object.h
lustre/lov/lov_io.c
lustre/osc/osc_compress.c
lustre/osc/osc_request.c

index 069da83..46f7463 100644 (file)
@@ -98,7 +98,7 @@ cfs_time_current||jiffies
 cfs_time_current_64||ktime_get
 cfs_time_current_sec||ktime_get_real_seconds
 CLASSERT||BUILD_BUG_ON()
-cp_chunk_log_bits||consider cp_compr_chunk_bits helper?
+cp_chunk_log_bits||cp_compr_chunk_log_bits
 msecs_to_jiffies||cfs_time_seconds
 DEFINE_TIMER||CFS_DEFINE_TIMER
 define OBD_CONNECT||see "XXX README XXX" below and contact adilger@whamcloud.com
index 09745d4..f7306bc 100644 (file)
@@ -792,11 +792,11 @@ struct cl_page {
        /* which slab kmem index this memory allocated from */
        short int               cp_kmem_index; /* 48 bits */
        /** Compression type **/
-       enum ll_compr_type      cp_comp_type:8;
+       enum ll_compr_type      cp_compr_type:8;
        /** Compression level **/
-       u8                      cp_comp_level:4;
+       u8                      cp_compr_level:4;
        /** Chunk Size **/
-       u8                      cp_chunk_log_bits:4; /* 64 bits */
+       u8                      cp_compr_chunk_log_bits:4; /* 64 bits */
        /**
         * Owning IO in cl_page_state::CPS_OWNED state. Sub-page can be owned
         * by sub-io. Protected by a VM lock.
@@ -812,7 +812,7 @@ struct cl_page {
        struct cl_sync_io       *cp_sync_io;
 };
 #define cl_page_compr_bits(clpage) \
-       (clpage->cp_chunk_log_bits + COMPR_CHUNK_MIN_BITS)
+       (clpage->cp_compr_chunk_log_bits + COMPR_CHUNK_MIN_BITS)
 
 /**
  * Per-layer part of cl_page.
index 575f009..18dbb36 100644 (file)
@@ -1494,9 +1494,9 @@ static void __set_page_compression(struct cl_page *page,
                                    struct lov_stripe_md_entry *lsme)
 {
        if (lsme->lsme_pattern & LOV_PATTERN_COMPRESS) {
-               page->cp_comp_type = lsme->lsme_compr_type;
-               page->cp_comp_level = lsme->lsme_compr_lvl;
-               page->cp_chunk_log_bits = lsme->lsme_compr_chunk_log_bits;
+               page->cp_compr_type = lsme->lsme_compr_type;
+               page->cp_compr_level = lsme->lsme_compr_lvl;
+               page->cp_compr_chunk_log_bits = lsme->lsme_compr_chunk_log_bits;
        }
 }
 
index 0904db3..f6a6f28 100644 (file)
@@ -131,8 +131,8 @@ int compress_request(const char *obd_name, struct obdo *oa,
        ENTRY;
 
        clpage = oap2cl_page(brw_page2oap(pga[0]));
-       lvl = clpage->cp_comp_level;
-       type = clpage->cp_comp_type;
+       lvl = clpage->cp_compr_level;
+       type = clpage->cp_compr_type;
 
        chunk_bits = cl_page_compr_bits(clpage);
        chunk_size = (1 << chunk_bits);
@@ -340,7 +340,7 @@ int decompress_request(struct osc_brw_async_args *aa, int page_count)
        ENTRY;
 
        clpage = oap2cl_page(brw_page2oap(pga[0]));
-       type = clpage->cp_comp_type;
+       type = clpage->cp_compr_type;
        /* no compression */
        if (type == LL_COMPR_TYPE_NONE)
                RETURN(0);
index ec01ec3..f789f9b 100644 (file)
@@ -1557,7 +1557,7 @@ osc_brw_prep_request(int cmd, struct client_obd *cli, struct obdo *oa,
                /* If compression disabled for the file NONE is set for all
                 * pages, so it is enough to check only one
                 */
-               compressed = clpage->cp_comp_type != LL_COMPR_TYPE_NONE;
+               compressed = clpage->cp_compr_type != LL_COMPR_TYPE_NONE;
 
                if (resend)
                        compressed = false;
@@ -1620,11 +1620,11 @@ osc_brw_prep_request(int cmd, struct client_obd *cli, struct obdo *oa,
                 * which is supposed to be used in this file chunk, try
                 * FAST compression type.
                 */
-               if ((COMPRESS_TYPE_TO_BIT(clpage->cp_comp_type) &
+               if ((COMPRESS_TYPE_TO_BIT(clpage->cp_compr_type) &
                     ocd->ocd_compress_types) == 0) {
                        for (i = 0; i < page_count; i++) {
                                clpage = oap2cl_page(brw_page2oap(pga[i]));
-                               clpage->cp_comp_type = LL_COMPR_TYPE_FAST;
+                               clpage->cp_compr_type = LL_COMPR_TYPE_FAST;
                        }
                }