From: Artem Blagodarenko Date: Thu, 16 May 2024 13:18:34 +0000 (-0400) Subject: EX-9784 csdc: Do not print error if a chunk is not compressed X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=e6971f543fc320059eb62e4fe3c7ac196ea155fc;p=fs%2Flustre-release.git EX-9784 csdc: Do not print error if a chunk is not compressed 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 Change-Id: I85f4850f989ba0fc8f00653f8f6b0f1b4837d625 Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/55128 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Sergey Cheremencev Reviewed-by: Andreas Dilger --- diff --git a/lustre/ofd/ofd_compress.c b/lustre/ofd/ofd_compress.c index edea35a..0e8bd5f 100644 --- a/lustre/ofd/ofd_compress.c +++ b/lustre/ofd/ofd_compress.c @@ -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); }