From 8a91091b9c37272525176e83518b0249d66a79e3 Mon Sep 17 00:00:00 2001 From: Patrick Farrell Date: Thu, 16 Nov 2023 15:37:57 -0500 Subject: [PATCH] EX-7601 osc: rename pages_in_chunk Chunks can have variable numbers of pages in them. Signed-off-by: Patrick Farrell Change-Id: If199d777367569e62c21305f6e4b9f3e4cce6d06 Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/53158 Tested-by: jenkins Tested-by: Andreas Dilger Reviewed-by: Artem Blagodarenko Reviewed-by: Andreas Dilger --- lustre/osc/osc_compress.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lustre/osc/osc_compress.c b/lustre/osc/osc_compress.c index ea6bda2..ebe1487 100644 --- a/lustre/osc/osc_compress.c +++ b/lustre/osc/osc_compress.c @@ -244,7 +244,7 @@ int decompress_request(struct osc_brw_async_args *aa, int page_count) struct crypto_comp *cc; unsigned int src_size; unsigned int dst_size; - int pages_in_chunk; + int pages_per_chunk; int pages_left; char *src = NULL; char *dst = NULL; @@ -266,7 +266,7 @@ int decompress_request(struct osc_brw_async_args *aa, int page_count) chunk_bits = cl_page_compr_bits(clpage); chunk_size = 1 << chunk_bits; buf_bits = chunk_bits + 1; - pages_in_chunk = chunk_size / PAGE_SIZE; + pages_per_chunk = chunk_size / PAGE_SIZE; rc = alloc_compr(obd_name, &type, lvl, &cc, true); if (rc) @@ -293,7 +293,7 @@ int decompress_request(struct osc_brw_async_args *aa, int page_count) i, oap->oap_obj_off); /* i is the first chunk aligned page in the RPC */ - for (; i < page_count; i+=pages_in_chunk) { + for (; i < page_count; i+=pages_per_chunk) { if (!is_chunk_start(pga[i]->pg, &llch)) continue; @@ -313,8 +313,8 @@ int decompress_request(struct osc_brw_async_args *aa, int page_count) GOTO(out, rc = -EIO); } - CDEBUG(D_SEC, "chunk_size: %i, pages_in_chunk: %i\n", - chunk_size, pages_in_chunk); + CDEBUG(D_SEC, "chunk_size: %i, pages_per_chunk: %i\n", + chunk_size, pages_per_chunk); sptlrpc_pool_get_pages((void **)&src, buf_bits); @@ -323,7 +323,7 @@ int decompress_request(struct osc_brw_async_args *aa, int page_count) if (src == NULL || dst == NULL) GOTO(out, rc = -ENOMEM); } - pages_left = min_t(int, pages_in_chunk, page_count - i); + pages_left = min_t(int, pages_per_chunk, page_count - i); CDEBUG(D_SEC, "Merge chunk [%i, %i], src: %px\n", i, i + pages_left - 1, src); -- 1.8.3.1