From: Chao Yu via Linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net>
To: Nanzhe Zhao <nzzhao@126.com>, Kim Jaegeuk <jaegeuk@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH v1 1/5] f2fs: Zero f2fs_folio_state on allocation
Date: Tue, 6 Jan 2026 17:16:25 +0800 [thread overview]
Message-ID: <61ba9e54-6e08-4140-b070-05fd696afa48@kernel.org> (raw)
In-Reply-To: <20260105153101.152892-2-nzzhao@126.com>
On 1/5/2026 11:30 PM, Nanzhe Zhao wrote:
> f2fs_folio_state is attached to folio->private and is expected to start
> with read_pages_pending == 0. However, the structure was allocated from
> ffs_entry_slab without being fully initialized, which can leave
> read_pages_pending with stale values.
>
> Allocate the object with __GFP_ZERO so all fields are reliably zeroed at
> creation time.
>
> Signed-off-by: Nanzhe Zhao <nzzhao@126.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Thanks,
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
WARNING: multiple messages have this Message-ID (diff)
From: Chao Yu <chao@kernel.org>
To: Nanzhe Zhao <nzzhao@126.com>, Kim Jaegeuk <jaegeuk@kernel.org>
Cc: chao@kernel.org, linux-f2fs-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 1/5] f2fs: Zero f2fs_folio_state on allocation
Date: Tue, 6 Jan 2026 17:16:25 +0800 [thread overview]
Message-ID: <61ba9e54-6e08-4140-b070-05fd696afa48@kernel.org> (raw)
In-Reply-To: <20260105153101.152892-2-nzzhao@126.com>
On 1/5/2026 11:30 PM, Nanzhe Zhao wrote:
> f2fs_folio_state is attached to folio->private and is expected to start
> with read_pages_pending == 0. However, the structure was allocated from
> ffs_entry_slab without being fully initialized, which can leave
> read_pages_pending with stale values.
>
> Allocate the object with __GFP_ZERO so all fields are reliably zeroed at
> creation time.
>
> Signed-off-by: Nanzhe Zhao <nzzhao@126.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Thanks,
next prev parent reply other threads:[~2026-01-06 9:16 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-05 15:30 [f2fs-dev] [PATCH v1 0/5] f2fs: fix large folio read corner cases for immutable files Nanzhe Zhao
2026-01-05 15:30 ` Nanzhe Zhao
2026-01-05 15:30 ` [f2fs-dev] [PATCH v1 1/5] f2fs: Zero f2fs_folio_state on allocation Nanzhe Zhao
2026-01-05 15:30 ` Nanzhe Zhao
2026-01-06 3:38 ` [f2fs-dev] " Barry Song
2026-01-06 3:38 ` Barry Song
2026-01-07 3:44 ` [f2fs-dev] " Nanzhe Zhao
2026-01-07 3:44 ` Nanzhe Zhao
2026-01-08 22:35 ` [f2fs-dev] " Barry Song
2026-01-08 22:35 ` Barry Song
2026-01-06 9:16 ` Chao Yu via Linux-f2fs-devel [this message]
2026-01-06 9:16 ` Chao Yu
2026-01-05 15:30 ` [f2fs-dev] [PATCH v1 2/5] f2fs: Accounting large folio subpages before bio submission Nanzhe Zhao
2026-01-05 15:30 ` Nanzhe Zhao
2026-01-06 9:16 ` [f2fs-dev] " Chao Yu via Linux-f2fs-devel
2026-01-06 9:16 ` Chao Yu
2026-01-05 15:30 ` [f2fs-dev] [PATCH v1 3/5] f2fs: add f2fs_block_needs_zeroing() to handle hole blocks Nanzhe Zhao
2026-01-05 15:30 ` Nanzhe Zhao
2026-01-06 9:19 ` [f2fs-dev] " Chao Yu via Linux-f2fs-devel
2026-01-06 9:19 ` Chao Yu
2026-01-06 11:25 ` [f2fs-dev] " Nanzhe Zhao
2026-01-06 11:25 ` Nanzhe Zhao
2026-01-06 9:30 ` [f2fs-dev] " kernel test robot
2026-01-06 9:30 ` kernel test robot
2026-01-05 15:31 ` [f2fs-dev] [PATCH v1 4/5] f2fs: add 'folio_in_bio' to handle readahead folios with no BIO submission Nanzhe Zhao
2026-01-05 15:31 ` Nanzhe Zhao
2026-01-06 9:31 ` [f2fs-dev] " Chao Yu via Linux-f2fs-devel
2026-01-06 9:31 ` Chao Yu
2026-01-07 0:33 ` [f2fs-dev] " Nanzhe Zhao
2026-01-07 0:33 ` Nanzhe Zhao
2026-01-07 1:16 ` [f2fs-dev] " Chao Yu via Linux-f2fs-devel
2026-01-07 1:16 ` Chao Yu
2026-01-05 15:31 ` [f2fs-dev] [PATCH v1 5/5] f2fs: advance index and offset after zeroing in large folio read Nanzhe Zhao
2026-01-05 15:31 ` Nanzhe Zhao
2026-01-06 9:35 ` [f2fs-dev] " Chao Yu via Linux-f2fs-devel
2026-01-06 9:35 ` Chao Yu
2026-01-07 3:08 ` [f2fs-dev] [PATCH v1 0/5] f2fs: fix large folio read corner cases for immutable files Jaegeuk Kim via Linux-f2fs-devel
2026-01-07 3:08 ` Jaegeuk Kim
2026-01-08 2:17 ` [f2fs-dev] " Nanzhe Zhao
2026-01-08 2:17 ` Nanzhe Zhao
2026-01-08 9:23 ` [f2fs-dev] " Chao Yu via Linux-f2fs-devel
2026-01-08 9:23 ` Chao Yu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=61ba9e54-6e08-4140-b070-05fd696afa48@kernel.org \
--to=linux-f2fs-devel@lists.sourceforge.net \
--cc=chao@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nzzhao@126.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.