From nobody Mon Feb 9 16:33:16 2026 Received: from m16.mail.126.com (m16.mail.126.com [117.135.210.7]) (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 5A270316912 for ; Mon, 5 Jan 2026 15:34:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=117.135.210.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767627250; cv=none; b=i2heYsCuzU4PnhhvafVcwjkI6UMsnLg1GtvEy3q2dob0vDuBFB0Mkh6k79r+tqVKw1z92ED/P1meFTd6RJVD9pn5IhPWLMdysF/TzRcksD/JAb+HjG/rpdC67t2ur/hrt75c+rGedxG3/T4xP0a5hc1x0onxCklwKzEoqDoxhDs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767627250; c=relaxed/simple; bh=t+aEv+on32nkftfShcn5dGoGWtFRpGb20yVUYo8Ax4s=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=IBiwiEJGv7udvxcVr/Jq41NRIgKFePSxR8V13r6Bps/2MYsR2QXf6mnpZoXL4c4j8s3vAADcgeIH4lSnmGfU1+fZ1KkbG8C4ILlvelsXOYvxxes6yLsGpEnMJ8Qq3//0TbAmSSh3r0YFwvtkNjMAh1SA9z3VaXDOSzXIHRM7d8Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=126.com; spf=pass smtp.mailfrom=126.com; dkim=pass (1024-bit key) header.d=126.com header.i=@126.com header.b=YAAnvHaW; arc=none smtp.client-ip=117.135.210.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=126.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=126.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=126.com header.i=@126.com header.b="YAAnvHaW" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=GO 3itdCPSkQnHkTqXXvHziXTo77mdzcUY7oiBvS+ZkM=; b=YAAnvHaW97WrvTlYfu OTnPAeRIcTWTEqFuXnjZvQxnHAVI/cO/gfn9rDj6yMholkwkqXc/qUMLOtl51XEz r7u+1No//ElGC+LDSvBNhBNkIjTdTZj9c1kVwjSdzQQ6fy2tQwv53kM4qCFbVsXH bAAZD9zv+G2OfGzDmuEVRlv60= Received: from YLLaptop.. (unknown []) by gzga-smtp-mtada-g0-1 (Coremail) with SMTP id _____wD3t6092Vtp4nHABA--.665S7; Mon, 05 Jan 2026 23:31:13 +0800 (CST) From: Nanzhe Zhao To: Kim Jaegeuk Cc: Chao Yu , linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Nanzhe Zhao Subject: [PATCH v1 5/5] f2fs: advance index and offset after zeroing in large folio read Date: Mon, 5 Jan 2026 23:31:01 +0800 Message-Id: <20260105153101.152892-6-nzzhao@126.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260105153101.152892-1-nzzhao@126.com> References: <20260105153101.152892-1-nzzhao@126.com> 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 X-CM-TRANSID: _____wD3t6092Vtp4nHABA--.665S7 X-Coremail-Antispam: 1Uf129KBjvdXoW7JFy3KrW7Cw45Cr4rAFW5Jrb_yoWkCwb_Zr 1kArs7A3y09rW3Kr4qyw4rt3s2qw4kWr15uFWUJFWUCr98ZrWfAa90vFZ3Ar1kW3yayFsI 93ykXw1rA34DujkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7xREuyI5UUUUU== X-CM-SenderInfo: xq22xtbr6rjloofrz/xtbBsQG3h2lb2UFI0wAA3x Content-Type: text/plain; charset="utf-8" In f2fs_read_data_large_folio(), the block zeroing path calls folio_zero_range() and then continues the loop. However, it fails to advance index and offset before continuing. This can cause the loop to repeatedly process the same subpage of the folio, leading to stalls/hangs and incorrect progress when reading large folios with holes/zeroed blocks. Fix it by incrementing index and offset in the zeroing path before continuing. Signed-off-by: Nanzhe Zhao --- fs/f2fs/data.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index ac569a396914..07c222bcc5e0 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -2446,7 +2446,7 @@ static int f2fs_read_data_large_folio(struct inode *i= node, if (!folio) goto out; - folio_in_bio =3D false + folio_in_bio =3D false; index =3D folio->index; offset =3D 0; ffs =3D NULL; @@ -2483,6 +2483,8 @@ static int f2fs_read_data_large_folio(struct inode *i= node, ret =3D -EIO; goto err_out; } + index++; + offset++; continue; } else if((map.m_flags & F2FS_MAP_MAPPED)) { block_nr =3D map.m_pblk + index - map.m_lblk; -- 2.34.1