Whamcloud - gitweb
EX-7601 osc: rename 'done'
authorPatrick Farrell <pfarrell@whamcloud.com>
Fri, 10 Nov 2023 22:10:34 +0000 (17:10 -0500)
committerAndreas Dilger <adilger@whamcloud.com>
Fri, 24 Nov 2023 09:27:51 +0000 (09:27 +0000)
Rename the ambiguous 'done' and remove it where not used.

Test-Parameters: trivial
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I8fb88b7a91fcc7dbd5ce2d29a61c18330fc0cda3
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/53098
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/osc/osc_compress.c

index b5eb0f4..263b896 100644 (file)
@@ -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);