Whamcloud - gitweb
EX-9784 csdc: Do not print error if a chunk is not compressed
authorArtem Blagodarenko <ablagodarenko@ddn.com>
Thu, 16 May 2024 13:18:34 +0000 (09:18 -0400)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 16 May 2024 23:58:02 +0000 (23:58 +0000)
is_chunk_start() can decide that a chunk can not be decompressed in
two cases: 1) chunk has not been compressed 2) chunk is corrupted

The error message should be printed only in case 2)

Signed-off-by: Artem Blagodarenko <ablagodarenko@ddn.com>
Change-Id: I85f4850f989ba0fc8f00653f8f6b0f1b4837d625
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/55128
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sergey Cheremencev <scherementsev@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/ofd/ofd_compress.c

index edea35a..0e8bd5f 100644 (file)
@@ -57,9 +57,10 @@ static int decompress_chunk_in_lnb(const char *obd_name, struct lu_fid *fid,
 
        /* if this chunk isn't compressed, don't uncompress it */
        if (!is_chunk_start(lnbs[lnb_start].lnb_page, &llch, &rc)) {
-               CERROR("%s: Header sanity failed: "DFID" at %llu: rc = %d\n",
-                      obd_name, PFID(fid), lnbs[lnb_start].lnb_file_offset,
-                      rc);
+               if (rc)
+                       CERROR("%s: Header sanity failed: "DFID" at %llu: rc = %d\n",
+                              obd_name, PFID(fid),
+                              lnbs[lnb_start].lnb_file_offset, rc);
                GOTO(out, rc);
        }