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>
/* 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);
}