From: "Nanzhe Zhao" <nzzhao@126.com>
To: "Chao Yu" <chao@kernel.org>
Cc: "Nanzhe Zhao" <nzzhao.sigma@gmail.com>,
linux-f2fs-devel@lists.sourceforge.net,
"Jaegeuk Kim" <jaegeuk@kernel.org>,
"Barry Song" <baohua@kernel.org>,
"Nanzhe Zhao" <zhaonanzhe@xiaomi.com>,
"Juan Yescas" <jyescas@google.com>,
"Daeho Jeong" <daehojeong@google.com>,
"Dev Jain" <Dev.Jain@arm.com>,
"David Hildenbrand" <David.Hildenbrand@arm.com>,
linux-kernel@vger.kernel.org, "Bo Zhang" <zhangbo56@xiaomi.com>,
"Kalesh Singh" <kaleshsingh@google.com>,
"Pengfei Li" <lipengfei28@xiaomi.com>,
"Ryan Roberts" <Ryan.Roberts@arm.com>
Subject: Re:Re: [PATCH v5 05/16] f2fs: support large folio writeback
Date: Thu, 22 Oct 2026 09:57:45 +0800 (CST) [thread overview]
Message-ID: <12edc14a.1662.1a1615420ba.Coremail.nzzhao@126.com> (raw)
In-Reply-To: <36d24c53-25e0-45de-889b-f309ee6a0bdd@kernel.org>
>>> +out:
>>> + /*
>>> + * Clear the dirty state of the subranges that were written back.
>>> + * If some subranges are still dirty (e.g. the folio was only
>>> + * partially written back), the folio must stay dirty so that
>>> + * the remaining subranges are written back later.
>>> + */
>>> + if (f2fs_ffs_clear_subrange_dirty_and_test(folio, 0,
>>> + (err ? pos : end_pos) - folio_pos(folio)))
>>> + folio_redirty_for_writepage(wbc, folio);
>
>For folio order-0, if f2fs_write_folio_dirty_range() failed, we need to redirty
>folio anyway, right? so it's need to check err as well?
>
>Thanks,
>
In f2fs: handle partial truncate of large folio dirty subpages I have the following hunk
@@ -4514,9 +4590,9 @@ static int f2fs_write_cache_folios(struct address_space *mapping,
* Redirty the folio if dirty subranges remain in a large
* folio, or if order-0 writeback fails due to an error.
*/
- if (f2fs_ffs_clear_subrange_dirty_and_test(folio, 0,
- (err ? pos : end_pos) - folio_pos(folio)) ||
- err)
+ dirty = f2fs_ffs_clear_subrange_dirty_and_test(folio, 0,
+ (err ? pos : end_pos) - folio_pos(folio));
+ if (dirty || err)
folio_redirty_for_writepage(wbc, folio);
else if (!f2fs_folio_has_ffs(folio))
inode_dec_dirty_block(inode);
to solve this problem. But it seems I have put this hunk in a wrong place.
It should be introduced in this patch I think.
next prev parent reply other threads:[~2026-10-22 1:58 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 6:44 [PATCH v5 00/16] f2fs: support & optimize large folios for writable files Nanzhe Zhao
2026-10-14 6:44 ` [PATCH v5 01/16] f2fs: extend folio state for large folio write path Nanzhe Zhao
2026-10-14 6:44 ` [PATCH v5 02/16] f2fs: carry subpage offset and count in write IO Nanzhe Zhao
2026-10-15 2:37 ` [f2fs-dev] " Jaegeuk Kim
2026-10-14 6:44 ` [PATCH v5 03/16] f2fs: support regular file buffered writes on large folios Nanzhe Zhao
2026-10-15 13:11 ` Chao Yu
2026-10-16 0:04 ` Chao Yu
2026-10-16 5:52 ` Nanzhe Zhao
2026-10-20 20:47 ` [f2fs-dev] " Daeho Jeong
2026-10-14 6:44 ` [PATCH v5 04/16] f2fs: support atomic file large folios buffered write Nanzhe Zhao
2026-10-14 6:44 ` [PATCH v5 05/16] f2fs: support large folio writeback Nanzhe Zhao
2026-10-16 0:39 ` Chao Yu
2026-10-16 3:57 ` Chao Yu
2026-10-22 1:57 ` Nanzhe Zhao [this message]
2026-10-14 6:44 ` [PATCH v5 06/16] f2fs: account large folio dirty data at block granularity Nanzhe Zhao
2026-10-14 6:44 ` [PATCH v5 07/16] f2fs: prepare mmap write faults for large folios Nanzhe Zhao
2026-10-14 6:44 ` [PATCH v5 08/16] f2fs: make GC migration large-folio aware Nanzhe Zhao
2026-10-16 11:25 ` Chao Yu
2026-10-14 6:44 ` [PATCH v5 09/16] f2fs: optimize small block size large folio read Nanzhe Zhao
2026-10-19 12:15 ` Chao Yu
2026-10-21 2:20 ` Nanzhe Zhao
2026-10-14 6:44 ` [PATCH v5 10/16] f2fs: support partial uptodate " Nanzhe Zhao
2026-10-15 13:34 ` Chao Yu
2026-10-19 11:52 ` Chao Yu
2026-10-14 6:44 ` [PATCH v5 11/16] f2fs: handle partial truncate of large folio dirty subpages Nanzhe Zhao
2026-10-14 6:44 ` [PATCH v5 12/16] f2fs: wait for folio writeback before ffs_detach_free Nanzhe Zhao
2026-10-14 6:44 ` [PATCH v5 13/16] f2fs: fix zeroing paths for large folios Nanzhe Zhao
2026-10-14 6:44 ` [PATCH v5 14/16] f2fs: handle block cloning within the same large folio Nanzhe Zhao
2026-10-14 6:44 ` [PATCH v5 15/16] f2fs: allow large folio support to writeable files Nanzhe Zhao
2026-10-14 6:44 ` [PATCH v5 16/16] f2fs: make compressed files compatible with large folio Nanzhe Zhao
2026-10-14 23:23 ` [f2fs-dev] [PATCH v5 00/16] f2fs: support & optimize large folios for writable files Jaegeuk Kim
2026-10-15 2:13 ` Jaegeuk Kim
2026-10-15 2:36 ` Chao Yu
2026-10-15 3:33 ` Nanzhe Zhao
2026-10-15 16:19 ` Jaegeuk Kim
2026-10-15 21:27 ` Jaegeuk Kim
2026-10-17 10:00 ` Nanzhe Zhao
2026-10-19 15:21 ` Jaegeuk Kim
2026-10-15 8:40 ` Nanzhe Zhao
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=12edc14a.1662.1a1615420ba.Coremail.nzzhao@126.com \
--to=nzzhao@126.com \
--cc=David.Hildenbrand@arm.com \
--cc=Dev.Jain@arm.com \
--cc=Ryan.Roberts@arm.com \
--cc=baohua@kernel.org \
--cc=chao@kernel.org \
--cc=daehojeong@google.com \
--cc=jaegeuk@kernel.org \
--cc=jyescas@google.com \
--cc=kaleshsingh@google.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lipengfei28@xiaomi.com \
--cc=nzzhao.sigma@gmail.com \
--cc=zhangbo56@xiaomi.com \
--cc=zhaonanzhe@xiaomi.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®