Skip to content

ext4: Stop using ext4_writepage() for writeout of ordered data

Jan Kara linux-ext4 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest13 patches 7 repliesIn review
  2. v312 patches 4 repliesSuperseded
  3. v210 of 11 patches 8 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v19 patches18 repliesSuperseded

Changes in v4 from the cover letter

* Added export of buffer_migrate_page_norefs()
* Clarified commit message about page migration a bit

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13ext4: Handle redirtying in ext4_bio_write_page()fs/ext4/page-io.c+12 -20 replies
2/13ext4: Move keep_towrite handling to ext4_bio_write_page()fs/ext4/ext4.h fs/ext4/inode.c fs/ext4/page-io.c+24 -210 replies
3/13ext4: Remove nr_submitted from ext4_bio_write_page()fs/ext4/page-io.c+0 -20 replies
4/13ext4: Drop pointless IO submission from ext4_bio_write_page()fs/ext4/page-io.c+0 -20 replies
5/13ext4: Add support for writepages calls that cannot map blocksfs/ext4/inode.c+48 -140 replies
6/13ext4: Provide ext4_do_writepages()fs/ext4/inode.c+54 -420 replies
7/13ext4: Move percpu_rwsem protection into ext4_writepages()fs/ext4/inode.c+10 -60 replies
8/13ext4: Switch to using ext4_do_writepages() for ordered data writeoutfs/ext4/ext4.h fs/ext4/inode.c fs/ext4/super.c+18 -20 replies
9/13jbd2: Switch jbd2_submit_inode_data() to use fs-provided hook for data writeoutfs/ext4/fast_commit.c fs/jbd2/commit.c include/linux/jbd2.h+4 -51 reply
10/13ext4: Switch to using write_cache_pages() for data=journal writeoutfs/ext4/inode.c+9 -12 replies
11/13mm: Export buffer_migrate_folio_norefs()mm/migrate.c+1 -01 reply
12/13ext4: Stop providing .writepage hookfs/ext4/inode.c+1 -38 replies
13/13ext4: Remove ordered data support from ext4_writepage()fs/ext4/inode.c+26 -1243 replies

Reviews trailers per patch

All 13 patches have a Reviewed-by or Acked-by.

PatchRitesh Harjani (IBM)Christoph Hellwig
1/13R-b
2/13R-b
3/13R-b
4/13R-b
5/13R-b
6/13R-b
7/13R-b
8/13R-b
9/13R-b
10/13R-b
11/13R-b
12/13R-b
13/13R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/13] ext4: Stop using ext4_writepage() for writeout of ordered data

Hello,

this patch series modifies ext4 so that we stop using ext4_writepage() for writeout of ordered data during transaction commit (through generic_writepages() from jbd2_journal_submit_inode_data_buffers()). Instead we directly call ext4_writepages() from the ext4_journal_submit_inode_data_buffers(). This is part of Christoph's effort to get rid of the .writepage() callback in all filesystems.

I have also modified ext4_writepages() to use write_cache_pages() instead of generic_writepages() so now we don't expose .writepage hook at all. We still keep ext4_writepage() as a callback for write_cache_pages(). We should refactor that path as well and get rid of ext4_writepage() completely but that is for a separate cleanup. Also note that jbd2 still uses generic_writepages() in its jbd2_journal_submit_inode_data_buffers() helper because it is still used from OCFS2. Again, something to be dealt with in a separate patchset.

Changes since v3:
* Added export of buffer_migrate_page_norefs()
* Clarified commit message about page migration a bit

Changes since v2:
* Added Reviewed-by tags from Christoph
* Added WARN_ON to verify we're not trying to start transaction from transaction commit writeback
* Converted fastcommit path to use ext4_writepages() for data writeout
* Some minor tweaks suggested by Christoph

Changes since v1:
* Added Reviewed-by tags from Ritesh
* Added patch to get rid of generic_writepages() in ext4_writepages()
* Added patch to get rid of .writepage hook

Honza
Previous versions: