From 6b05e50b9b15035e26bc450799060db345bda841 Mon Sep 17 00:00:00 2001 From: Artem Blagodarenko Date: Tue, 16 Apr 2024 19:02:32 +0100 Subject: [PATCH] EX-9192 csdc: Fix the upper mergeable chunk pointer If the full chunk is followed by un mergeable page, the upper mergeable chunk pointer is occasionally set to this unmanageable page. The chunk size is calculated wrongly then and the next condition suggest not to compress this chunk, because its size is not equal to the expected size. The pointer should be moved to the first instruction after the can_merge_pages(). Signed-off-by: Artem Blagodarenko Change-Id: I09fedc770c8bbcac4864b32372a941da5e0c7ac3 Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/54814 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger --- lustre/osc/osc_compress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/osc/osc_compress.c b/lustre/osc/osc_compress.c index fb45ec2..5d8033b 100644 --- a/lustre/osc/osc_compress.c +++ b/lustre/osc/osc_compress.c @@ -186,7 +186,6 @@ int compress_request(struct client_obd *cli, struct obdo *oa, struct brw_page *pg_curr; pg_curr = pga[curr]; - chunk_len = curr - chunk_start + 1; /* these pages can't be merged, so can't be in the same * chunk @@ -205,6 +204,7 @@ int compress_request(struct client_obd *cli, struct obdo *oa, break; } + chunk_len = curr - chunk_start + 1; /* chunk is full, stop here */ if (chunk_len == pages_per_chunk) { CDEBUG(D_SEC, "chunk full, [%d, %d]\n", -- 1.8.3.1