From: Chao Yu <chao@kernel.org>
To: Daeho Jeong <daeho43@gmail.com>,
linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com
Cc: chao@kernel.org, Daeho Jeong <daehojeong@google.com>
Subject: Re: [f2fs-dev] [PATCH v2 07/20] f2fs: support subpage blocks in data write path and writeback
Date: Tue, 17 Nov 2026 18:43:38 +0800 [thread overview]
Message-ID: <6733d2b6-e41c-4f9e-9ccd-80a704c5307a@kernel.org> (raw)
In-Reply-To: <20261116040851.2849696-8-daeho43@gmail.com>
On 11/16/26 12:08, Daeho Jeong wrote:
> From: Daeho Jeong <daehojeong@google.com>
>
> With blocks smaller than PAGE_SIZE, a folio holds several blocks, so
> write_begin, write_end and writeback have to handle individual blocks
> instead of the whole folio.
>
> - Read, zero and reserve the blocks touched by a write per block in
> write_begin, and mark only the written blocks dirty in write_end.
> - Write back only the dirty blocks of a multi-block folio and complete
> write I/O per block. In subpage mode every inode is written back by
> f2fs_write_cache_folios(), which now handles dentry and quota folios
> and checkpoint errors as f2fs_write_single_data_page() does. Both use
> the new f2fs_cp_controlled_inode() and f2fs_wb_folio_action() helpers
> for these rules.
> It also resets the error for each folio, so that the remaining folios
> are still written back after an error, as writeback_iter() expects
> for integrity writeback, instead of redirtying them.
> f2fs_write_folio_dirty_range() cleans up each block where it is
> written or skipped, and advances last_disk_size only up to the last
> block it submitted. On an error, it clears the dirty state of the
> blocks before the failed one, so that only the failed block and the
> ones after it are written again.
> - Count inode dirty blocks from the dirty bits of the folio state, and
> count every block of a folio dirtied without one, e.g. after a read
> of the whole folio or through folio_mark_dirty(). Attaching a folio
> state to a dirty folio converts its count to the dirty bits, so the
> counter stays balanced.
> - ->dirty_folio() does not know which blocks were modified, so it marks
> the uptodate blocks of the folio within EOF dirty. Otherwise, a folio
> dirtied by mm after writeback cleared its dirty bits, e.g. through a
> pinned page, is cleaned without being written. The updates made by
> f2fs mark only the blocks they modify and dirty the folio with
> f2fs_folio_mark_dirty(), which keeps the other blocks clean.
> - Compressed and atomic files are not supported yet in subpage mode:
> write_begin returns -EOPNOTSUPP for them. Inline data is converted
> first.
>
> Some of these changes also apply to large folios when the block size
> equals PAGE_SIZE.
>
> Signed-off-by: Daeho Jeong <daehojeong@google.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Thanks,
WARNING: multiple messages have this Message-ID (diff)
From: Chao Yu via Linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net>
To: Daeho Jeong <daeho43@gmail.com>,
linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com
Cc: Daeho Jeong <daehojeong@google.com>
Subject: Re: [f2fs-dev] [PATCH v2 07/20] f2fs: support subpage blocks in data write path and writeback
Date: Tue, 17 Nov 2026 18:43:38 +0800 [thread overview]
Message-ID: <6733d2b6-e41c-4f9e-9ccd-80a704c5307a@kernel.org> (raw)
In-Reply-To: <20261116040851.2849696-8-daeho43@gmail.com>
On 11/16/26 12:08, Daeho Jeong wrote:
> From: Daeho Jeong <daehojeong@google.com>
>
> With blocks smaller than PAGE_SIZE, a folio holds several blocks, so
> write_begin, write_end and writeback have to handle individual blocks
> instead of the whole folio.
>
> - Read, zero and reserve the blocks touched by a write per block in
> write_begin, and mark only the written blocks dirty in write_end.
> - Write back only the dirty blocks of a multi-block folio and complete
> write I/O per block. In subpage mode every inode is written back by
> f2fs_write_cache_folios(), which now handles dentry and quota folios
> and checkpoint errors as f2fs_write_single_data_page() does. Both use
> the new f2fs_cp_controlled_inode() and f2fs_wb_folio_action() helpers
> for these rules.
> It also resets the error for each folio, so that the remaining folios
> are still written back after an error, as writeback_iter() expects
> for integrity writeback, instead of redirtying them.
> f2fs_write_folio_dirty_range() cleans up each block where it is
> written or skipped, and advances last_disk_size only up to the last
> block it submitted. On an error, it clears the dirty state of the
> blocks before the failed one, so that only the failed block and the
> ones after it are written again.
> - Count inode dirty blocks from the dirty bits of the folio state, and
> count every block of a folio dirtied without one, e.g. after a read
> of the whole folio or through folio_mark_dirty(). Attaching a folio
> state to a dirty folio converts its count to the dirty bits, so the
> counter stays balanced.
> - ->dirty_folio() does not know which blocks were modified, so it marks
> the uptodate blocks of the folio within EOF dirty. Otherwise, a folio
> dirtied by mm after writeback cleared its dirty bits, e.g. through a
> pinned page, is cleaned without being written. The updates made by
> f2fs mark only the blocks they modify and dirty the folio with
> f2fs_folio_mark_dirty(), which keeps the other blocks clean.
> - Compressed and atomic files are not supported yet in subpage mode:
> write_begin returns -EOPNOTSUPP for them. Inline data is converted
> first.
>
> Some of these changes also apply to large folios when the block size
> equals PAGE_SIZE.
>
> Signed-off-by: Daeho Jeong <daehojeong@google.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
next prev parent reply other threads:[~2026-11-17 10:43 UTC|newest]
Thread overview: 86+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 4:08 [PATCH v2 00/20] f2fs: support block size smaller than PAGE_SIZE Daeho Jeong
2026-11-16 4:08 ` [f2fs-dev] " Daeho Jeong
2026-11-16 4:08 ` [PATCH v2 01/20] f2fs: use block-based index and size calculations in more paths Daeho Jeong
2026-11-16 4:08 ` [f2fs-dev] " Daeho Jeong
2026-11-17 8:53 ` Chao Yu
2026-11-17 8:53 ` Chao Yu via Linux-f2fs-devel
2026-11-16 4:08 ` [PATCH v2 02/20] f2fs: support subpage block size superblock and mount Daeho Jeong
2026-11-16 4:08 ` [f2fs-dev] " Daeho Jeong
2026-11-17 8:53 ` Chao Yu via Linux-f2fs-devel
2026-11-17 8:53 ` Chao Yu
2026-11-16 4:08 ` [PATCH v2 03/20] f2fs: extend f2fs_folio_state for subpage blocks Daeho Jeong
2026-11-16 4:08 ` [f2fs-dev] " Daeho Jeong
2026-11-17 8:54 ` Chao Yu
2026-11-17 8:54 ` Chao Yu via Linux-f2fs-devel
2026-11-16 4:08 ` [PATCH v2 04/20] f2fs: support subpage blocks in directory operations Daeho Jeong
2026-11-16 4:08 ` [f2fs-dev] " Daeho Jeong
2026-11-17 8:54 ` Chao Yu via Linux-f2fs-devel
2026-11-17 8:54 ` Chao Yu
2026-11-16 4:08 ` [PATCH v2 05/20] f2fs: convert inode dirty page counters to dirty block counters Daeho Jeong
2026-11-16 4:08 ` [f2fs-dev] " Daeho Jeong
2026-11-17 8:54 ` Chao Yu
2026-11-17 8:54 ` Chao Yu via Linux-f2fs-devel
2026-11-16 4:08 ` [PATCH v2 06/20] f2fs: support subpage blocks in data read path and GC Daeho Jeong
2026-11-16 4:08 ` [f2fs-dev] " Daeho Jeong
2026-11-17 8:58 ` Chao Yu
2026-11-17 8:58 ` Chao Yu via Linux-f2fs-devel
2026-11-17 16:51 ` Jaegeuk Kim
2026-11-17 16:51 ` Jaegeuk Kim via Linux-f2fs-devel
2026-11-16 4:08 ` [PATCH v2 07/20] f2fs: support subpage blocks in data write path and writeback Daeho Jeong
2026-11-16 4:08 ` [f2fs-dev] " Daeho Jeong
2026-11-17 10:43 ` Chao Yu [this message]
2026-11-17 10:43 ` Chao Yu via Linux-f2fs-devel
2026-11-16 4:08 ` [PATCH v2 08/20] f2fs: adapt range operations and mmap for subpage blocks Daeho Jeong
2026-11-16 4:08 ` [f2fs-dev] " Daeho Jeong
2026-11-17 11:05 ` Chao Yu via Linux-f2fs-devel
2026-11-17 11:05 ` Chao Yu
2026-11-16 4:08 ` [PATCH v2 09/20] f2fs: support subpage blocks in pinned files Daeho Jeong
2026-11-16 4:08 ` [f2fs-dev] " Daeho Jeong
2026-11-17 11:09 ` Chao Yu via Linux-f2fs-devel
2026-11-17 11:09 ` Chao Yu
2026-11-16 4:08 ` [PATCH v2 10/20] f2fs: support subpage blocks in collapse and insert range Daeho Jeong
2026-11-16 4:08 ` [f2fs-dev] " Daeho Jeong
2026-11-17 11:13 ` Chao Yu via Linux-f2fs-devel
2026-11-17 11:13 ` Chao Yu
2026-11-16 4:08 ` [PATCH v2 11/20] f2fs: support subpage blocks in move range Daeho Jeong
2026-11-16 4:08 ` [f2fs-dev] " Daeho Jeong
2026-11-17 11:22 ` Chao Yu via Linux-f2fs-devel
2026-11-17 11:22 ` Chao Yu
2026-11-16 4:08 ` [PATCH v2 12/20] f2fs: support subpage blocks in defragmentation Daeho Jeong
2026-11-16 4:08 ` [f2fs-dev] " Daeho Jeong
2026-11-17 11:25 ` Chao Yu via Linux-f2fs-devel
2026-11-17 11:25 ` Chao Yu
2026-11-16 4:08 ` [PATCH v2 13/20] f2fs: support subpage blocks in swapfile activation Daeho Jeong
2026-11-16 4:08 ` [f2fs-dev] " Daeho Jeong
2026-11-17 11:25 ` Chao Yu
2026-11-17 11:25 ` Chao Yu via Linux-f2fs-devel
2026-11-16 4:08 ` [PATCH v2 14/20] f2fs: support subpage blocks in fs-verity enablement Daeho Jeong
2026-11-16 4:08 ` [f2fs-dev] " Daeho Jeong
2026-11-17 11:38 ` Chao Yu
2026-11-17 11:38 ` Chao Yu via Linux-f2fs-devel
2026-11-16 4:08 ` [PATCH v2 15/20] f2fs: support subpage blocks in atomic writes Daeho Jeong
2026-11-16 4:08 ` [f2fs-dev] " Daeho Jeong
2026-11-17 11:39 ` Chao Yu via Linux-f2fs-devel
2026-11-17 11:39 ` Chao Yu
2026-11-16 4:08 ` [PATCH v2 16/20] f2fs: preserve inline data in subpage block mode Daeho Jeong
2026-11-16 4:08 ` [f2fs-dev] " Daeho Jeong
2026-11-17 11:40 ` Chao Yu
2026-11-17 11:40 ` Chao Yu via Linux-f2fs-devel
2026-11-16 4:08 ` [PATCH v2 17/20] f2fs: support subpage blocks in online resize Daeho Jeong
2026-11-16 4:08 ` [f2fs-dev] " Daeho Jeong
2026-11-17 11:41 ` Chao Yu via Linux-f2fs-devel
2026-11-17 11:41 ` Chao Yu
2026-11-16 4:08 ` [PATCH v2 18/20] f2fs: support subpage blocks in compression Daeho Jeong
2026-11-16 4:08 ` [f2fs-dev] " Daeho Jeong
2026-11-18 2:29 ` Chao Yu via Linux-f2fs-devel
2026-11-18 2:29 ` Chao Yu
2026-11-16 4:08 ` [PATCH v2 19/20] f2fs: count compress cache entries in pages for its memory limit Daeho Jeong
2026-11-16 4:08 ` [f2fs-dev] " Daeho Jeong
2026-11-18 2:30 ` Chao Yu
2026-11-18 2:30 ` Chao Yu via Linux-f2fs-devel
2026-11-16 4:08 ` [PATCH v2 20/20] f2fs: enable subpage block size support Daeho Jeong
2026-11-16 4:08 ` [f2fs-dev] " Daeho Jeong
2026-11-18 2:30 ` Chao Yu
2026-11-18 2:30 ` Chao Yu via Linux-f2fs-devel
2026-11-17 16:50 ` [f2fs-dev] [PATCH v2 00/20] f2fs: support block size smaller than PAGE_SIZE patchwork-bot+f2fs--- via Linux-f2fs-devel
2026-11-17 16:50 ` patchwork-bot+f2fs
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=6733d2b6-e41c-4f9e-9ccd-80a704c5307a@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 \
/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.