From fb0d2d04d61ecbe504a21a86a6af351a41ded864 Mon Sep 17 00:00:00 2001 From: Jian Yu Date: Tue, 16 Jan 2024 17:10:58 -0800 Subject: [PATCH] EX-8353 csdc: rename "cp_comp_*" to "cp_compr_*" 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 Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/52761 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Sebastien Buisson Reviewed-by: Andreas Dilger --- contrib/scripts/spelling.txt | 2 +- lustre/include/cl_object.h | 8 ++++---- lustre/lov/lov_io.c | 6 +++--- lustre/osc/osc_compress.c | 6 +++--- lustre/osc/osc_request.c | 6 +++--- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/contrib/scripts/spelling.txt b/contrib/scripts/spelling.txt index 069da83..46f7463 100644 --- a/contrib/scripts/spelling.txt +++ b/contrib/scripts/spelling.txt @@ -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 diff --git a/lustre/include/cl_object.h b/lustre/include/cl_object.h index 09745d4..f7306bc 100644 --- a/lustre/include/cl_object.h +++ b/lustre/include/cl_object.h @@ -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. diff --git a/lustre/lov/lov_io.c b/lustre/lov/lov_io.c index 575f009..18dbb36 100644 --- a/lustre/lov/lov_io.c +++ b/lustre/lov/lov_io.c @@ -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; } } diff --git a/lustre/osc/osc_compress.c b/lustre/osc/osc_compress.c index 0904db3..f6a6f28 100644 --- a/lustre/osc/osc_compress.c +++ b/lustre/osc/osc_compress.c @@ -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); diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index ec01ec3..f789f9b 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -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; } } -- 1.8.3.1