From nobody Sat Feb 7 07:25:35 2026 Received: from out30-111.freemail.mail.aliyun.com (out30-111.freemail.mail.aliyun.com [115.124.30.111]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6346715853B for ; Fri, 26 Dec 2025 06:09:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.111 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766729402; cv=none; b=NRKzPwe+TXOAUcPJWFLEhp+BiVX8z857alTetNUqf8//pC5gZ9/qd09BkcAF8JlR5I560wsUMzRvqwWWXGanmHC/ZNeuVv15+bK4kXAqWoZU/Z3Exs3SIKGCFUmWHm6dN5BYWqxnECxdce/wNVxbuo5gcgTF2HvFBCi06mQKSBM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766729402; c=relaxed/simple; bh=LYTNaA4+ZG6W/vDkEII9XzRuShRNzkxAjlebWubAj3I=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Hv6konRJ+8QqkYT+oK6WV+p0JWpb9OV/maG5d2BQdgPoAKb5tgvF1t0IaKFrJ44Xm9tyZbt5hbhqXx6Fv34EvdA8b40S3MPEsV/YBYwXxfQFOor1FLVLLAl2n3W3MvEe6RBopUY0neEvWeB4NidT2njlbEhuy3XZv46U2LFyCyg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=o3hMd0IJ; arc=none smtp.client-ip=115.124.30.111 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="o3hMd0IJ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1766729390; h=From:To:Subject:Date:Message-ID:MIME-Version; bh=50UODVW6LHH7s725vA6IywII8pTnQqfvAH6qf1Im5Og=; b=o3hMd0IJR0U7S6upYWsDDh4BE0WuvJw446H5jtKwfDtjGSWg/ELjvA37VFa4UfRXxjKxCPDIkqrKRq2M8JBC8RDvHaKNGsJ6+66jav6o2WgR7obE/gaVHJkwWvEd/GnqbCXpIC5Qohsqw2zEH/nLNSkm2T1E5Bao7DiTgQv6Euk= Received: from x31i01179.sqa.na131.tbsite.net(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0WvgZnn1_1766729386 cluster:ay36) by smtp.aliyun-inc.com; Fri, 26 Dec 2025 14:09:49 +0800 From: Gao Xiang To: linux-erofs@lists.ozlabs.org Cc: LKML , Gao Xiang Subject: [PATCH] erofs: avoid noisy messages for transient -ENOMEM Date: Fri, 26 Dec 2025 14:09:45 +0800 Message-ID: <20251226060945.786901-1-hsiangkao@linux.alibaba.com> X-Mailer: git-send-email 2.43.5 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" EROFS may allocate temporary pages using GFP_NOWAIT | GFP_NORETRY when pcl->besteffort is off (e.g., for readahead requests). If the allocation fails, the original request will fall back to synchronous read, so the failure is transient. Such fallback can frequently happen in low memory scenarios, but since these failures are expected and temporary, avoid printing error messages like below: [ 7425.184264] erofs (device sr0): failed to decompress (lz4) -ENOMEM @ pa = 148447232 size 28672 =3D> 26788 [ 7426.244267] erofs (device sr0): failed to decompress (lz4) -ENOMEM @ pa = 149422080 size 28672 =3D> 15903 [ 7426.245508] erofs (device sr0): failed to decompress (lz4) -ENOMEM @ pa = 138440704 size 28672 =3D> 39294 ... [ 7504.258373] erofs (device sr0): failed to decompress (lz4) -ENOMEM @ pa = 93581312 size 20480 =3D> 47366 Fixes: 831faabed812 ("erofs: improve decompression error reporting") Signed-off-by: Gao Xiang Reviewed-by: Chao Yu --- fs/erofs/zdata.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c index 3d31f7840ca0..bc2e0d3b97dd 100644 --- a/fs/erofs/zdata.c +++ b/fs/erofs/zdata.c @@ -1324,9 +1324,10 @@ static int z_erofs_decompress_pcluster(struct z_erof= s_backend *be, bool eio) GFP_NOWAIT | __GFP_NORETRY }, be->pagepool); if (IS_ERR(reason)) { - erofs_err(be->sb, "failed to decompress (%s) %ld @ pa %llu size %u =3D>= %u", - alg->name, PTR_ERR(reason), pcl->pos, - pcl->pclustersize, pcl->length); + if (pcl->besteffort || reason !=3D ERR_PTR(-ENOMEM)) + erofs_err(be->sb, "failed to decompress (%s) %ld @ pa %llu size %u =3D= > %u", + alg->name, PTR_ERR(reason), pcl->pos, + pcl->pclustersize, pcl->length); err =3D PTR_ERR(reason); } else if (unlikely(reason)) { erofs_err(be->sb, "failed to decompress (%s) %s @ pa %llu size %u =3D> = %u", --=20 2.43.5