From: Chao Yu <chao@kernel.org>
To: Daeho Jeong <daeho43@gmail.com>, Zhiguo Niu <niuzhiguo84@gmail.com>
Cc: chao@kernel.org, Daeho Jeong <daehojeong@google.com>,
kernel-team@android.com, linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [PATCH v6] f2fs: revert summary entry count from 2048 to 512 in 16kb block support
Date: Tue, 11 Nov 2025 10:34:55 +0800 [thread overview]
Message-ID: <0cc190c7-a069-48da-9847-7ee597616f09@kernel.org> (raw)
In-Reply-To: <20251110153519.2852720-1-daeho43@gmail.com>
Daeho,
As Zhiguo's reminder, I missed that f2fs_update_meta_page() has the same issue as well,
so we need to use f2fs_grab_meta_folio() in f2fs_update_meta_page() as well.
Thanks Zhiguo for code review and reminder.
Let me know if I missed something.
On 11/10/25 23:35, Daeho Jeong wrote:
> void f2fs_update_meta_page(struct f2fs_sb_info *sbi,
> void *src, block_t blk_addr)
> {
struct folio *folio;
if (SUMS_PER_BLOCK == 1)
folio = f2fs_grab_meta_folio(sbi, blk_addr);
else
folio = f2fs_get_meta_folio_retry(sbi, blk_addr);
> - struct folio *folio = f2fs_grab_meta_folio(sbi, blk_addr);
> + struct folio *folio = f2fs_get_meta_folio_retry(sbi, blk_addr);
> +
> + if (IS_ERR(folio))
> + return;
>
> memcpy(folio_address(folio), src, PAGE_SIZE);
> folio_mark_dirty(folio);
> @@ -2720,9 +2723,21 @@ void f2fs_update_meta_page(struct f2fs_sb_info *sbi,
> }
>
> static void write_sum_page(struct f2fs_sb_info *sbi,
> - struct f2fs_summary_block *sum_blk, block_t blk_addr)
> + struct f2fs_summary_block *sum_blk, unsigned int segno)
> {
> - f2fs_update_meta_page(sbi, (void *)sum_blk, blk_addr);
> + struct folio *folio;
> +
> + if (SUMS_PER_BLOCK == 1)
> + return f2fs_update_meta_page(sbi, (void *)sum_blk,
> + GET_SUM_BLOCK(sbi, segno));
> +
> + folio = f2fs_get_sum_folio(sbi, segno);
> + if (IS_ERR(folio))
> + return;
> +
> + memcpy(SUM_BLK_PAGE_ADDR(folio, segno), sum_blk, sizeof(*sum_blk));
> + folio_mark_dirty(folio);
> + f2fs_folio_put(folio, true);
> }
prev parent reply other threads:[~2025-11-11 2:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-10 15:35 Daeho Jeong
2025-11-11 2:34 ` Chao Yu [this message]
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=0cc190c7-a069-48da-9847-7ee597616f09@kernel.org \
--to=chao@kernel.org \
--cc=daeho43@gmail.com \
--cc=daehojeong@google.com \
--cc=kernel-team@android.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=niuzhiguo84@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®