From: Patrick Farrell Date: Fri, 10 Nov 2023 22:10:34 +0000 (-0500) Subject: EX-7601 osc: rename 'done' X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=129f8b1ac20ae10a59f3c474fb1ef5a5baf96254;p=fs%2Flustre-release.git EX-7601 osc: rename 'done' Rename the ambiguous 'done' and remove it where not used. Test-Parameters: trivial Signed-off-by: Patrick Farrell Change-Id: I8fb88b7a91fcc7dbd5ce2d29a61c18330fc0cda3 Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/53098 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger --- diff --git a/lustre/osc/osc_compress.c b/lustre/osc/osc_compress.c index b5eb0f4..263b896 100644 --- a/lustre/osc/osc_compress.c +++ b/lustre/osc/osc_compress.c @@ -118,6 +118,7 @@ int compress_request(const char *obd_name, struct obdo *oa, { struct cl_page *clpage; unsigned int applied_type = LL_COMPR_TYPE_UNCHANGED; + bool compressed = false; unsigned int src_size; unsigned int dst_size; int chunk_start = 0; @@ -130,7 +131,6 @@ int compress_request(const char *obd_name, struct obdo *oa, int chunk_bits; int cpga_i = 0; int count = 0; - int done = 0; int rc = 0; int pga_i; @@ -175,7 +175,7 @@ int compress_request(const char *obd_name, struct obdo *oa, */ if (clpage->cp_comp_type != LL_COMPR_TYPE_NONE && applied_type) { - done = compress_chunk(obd_name, src, + compressed = compress_chunk(obd_name, src, src_size, dst, &dst_size, clpage->cp_comp_type, clpage->cp_comp_level, @@ -190,14 +190,14 @@ int compress_request(const char *obd_name, struct obdo *oa, "Compressed %u, plain %u\n", dst_size, src_size); } else { - done = 0; + compressed = false; dst_size = src_size; } - rc = fill_cpga(*cpga, pga, done ? dst : NULL, + rc = fill_cpga(*cpga, pga, compressed ? dst : NULL, chunk_start, cpga_i, dst_size); - if (!done) { + if (!compressed) { sptlrpc_pool_put_pages(&dst, dest_buf_bits); } else { (*cpga)[cpga_i]->bp_cmp_chunk = dst; @@ -243,7 +243,6 @@ int decompress_request(struct osc_brw_async_args *aa, int page_count) int chunk_bits; int chunk_size; int count = 0; - int done = 0; int buf_bits; int rc = 0; int i = 0; @@ -329,8 +328,7 @@ int decompress_request(struct osc_brw_async_args *aa, int page_count) if (rc) GOTO(out, rc); - CDEBUG(D_SEC, "Decompressed size %u, status %i\n", - dst_size, done); + CDEBUG(D_SEC, "Decompressed size %u\n", dst_size); LASSERT(dst_size <= chunk_size); unmerge_chunk(pga, NULL, i, pages_left, dst, dst_size);