From cbb83aef92aee8b2d80fe1eb0b52d06bfcd491a3 Mon Sep 17 00:00:00 2001 From: Patrick Farrell Date: Fri, 10 Nov 2023 17:07:39 -0500 Subject: [PATCH] EX-7601 osc: rename pages_in_chunk Use the more standard pages_per_chunk. Test-Parameters: trivial Signed-off-by: Patrick Farrell Change-Id: I47e0995fe8aa8d1a9a610669d6cd4c39559b6fa4 Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/53097 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger --- lustre/osc/osc_compress.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lustre/osc/osc_compress.c b/lustre/osc/osc_compress.c index c6853e5..b5eb0f4 100644 --- a/lustre/osc/osc_compress.c +++ b/lustre/osc/osc_compress.c @@ -121,7 +121,7 @@ int compress_request(const char *obd_name, struct obdo *oa, unsigned int src_size; unsigned int dst_size; int chunk_start = 0; - int pages_in_chunk; + int pages_per_chunk; int dest_buf_bits; int src_buf_bits; void *src = NULL; @@ -139,7 +139,7 @@ int compress_request(const char *obd_name, struct obdo *oa, clpage = oap2cl_page(brw_page2oap(pga[chunk_start])); chunk_bits = cl_page_compr_bits(clpage); chunk_size = (1 << chunk_bits); - pages_in_chunk = chunk_size / PAGE_SIZE; + pages_per_chunk = chunk_size / PAGE_SIZE; OBD_ALLOC(*cpga, *page_count * sizeof(**cpga)); src_buf_bits = chunk_bits; @@ -150,7 +150,7 @@ int compress_request(const char *obd_name, struct obdo *oa, GOTO(out, rc = -ENOMEM); for (pga_i = 0; pga_i < *page_count; pga_i++) { - if ((pga_i + 1 - chunk_start == pages_in_chunk) || + if ((pga_i + 1 - chunk_start == pages_per_chunk) || (pga_i == *page_count - 1) || !can_merge_pages(pga[pga_i], pga[pga_i + 1])) { clpage = oap2cl_page(brw_page2oap(pga[chunk_start])); -- 1.8.3.1