start removing writepage instances v2
Subsystems (9)
Hi all,
The VM doesn't need or want ->writepage for writeback and is fine with just having ->writepages as long as ->migrate_folio is implemented.
This series removes all ->writepage instances that use block_write_full_page directly and also have a plain mpage_writepages based ->writepages.
Andrew, can you pick this up through the -mm tree?
Changes since v1:
- dropped the ext2 and udf patches that Jan merged through his tree
- collected a bunch of ACKs
Diffstat:
exfat/inode.c | 9 ++------- fat/inode.c | 9 ++------- hfs/inode.c | 2 +- hfsplus/inode.c | 2 +- hpfs/file.c | 9 ++------- jfs/inode.c | 7 +------ omfs/file.c | 7 +------ 7 files changed, 10 insertions(+), 35 deletions(-)
PATCH 1/7 extfat: remove ->writepage
->writepage is a very inefficient method to write back data, and only used through write_cache_pages or a a fallback when no ->migrate_folio method is present.
Set ->migrate_folio to the generic buffer_head based helper, and remove the ->writepage implementation.
--- fs/exfat/inode.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
fs/exfat/inode.c +2 -7
@@ -345,11 +345,6 @@ static void exfat_readahead(struct readahead_control *rac)mpage_readahead (rac, exfat_get_block); } -static int exfat_writepage (struct page *page,struct writeback_control *wbc) -{ -return block_write_full_page (page, exfat_get_block, wbc); -} -static int exfat_writepages (struct address_space *mapping,struct writeback_control *wbc) {
@@ -473,12 +468,12 @@ static const struct address_space_operations exfat_aops = { .invalidate_folio = block_invalidate_folio, .read_folio = exfat_read_folio, .readahead = exfat_readahead, - .writepage = exfat_writepage, .writepages = exfat_writepages, .write_begin = exfat_write_begin, .write_end = exfat_write_end, .direct_IO = exfat_direct_IO, - .bmap = exfat_aop_bmap + .bmap = exfat_aop_bmap, + .migrate_folio = buffer_migrate_folio, };static inline unsigned long exfat_hash (loff_t i_pos)
Signature · 1 line
2.30.2
PATCH 2/7 fat: remove ->writepage
In reply to Christoph Hellwig->writepage is a very inefficient method to write back data, and only used through write_cache_pages or a a fallback when no ->migrate_folio method is present.
Set ->migrate_folio to the generic buffer_head based helper, and remove the ->writepage implementation.
--- fs/fat/inode.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
fs/fat/inode.c +2 -7
@@ -194,11 +194,6 @@ static int fat_get_block(struct inode *inode, sector_t iblock,return 0 ; } -static int fat_writepage (struct page *page,struct writeback_control *wbc) -{ -return block_write_full_page (page, fat_get_block, wbc); -} -static int fat_writepages (struct address_space *mapping,struct writeback_control *wbc) {
@@ -346,12 +341,12 @@ static const struct address_space_operations fat_aops = { .invalidate_folio = block_invalidate_folio, .read_folio = fat_read_folio, .readahead = fat_readahead, - .writepage = fat_writepage, .writepages = fat_writepages, .write_begin = fat_write_begin, .write_end = fat_write_end, .direct_IO = fat_direct_IO, - .bmap = _fat_bmap + .bmap = _fat_bmap, + .migrate_folio = buffer_migrate_folio, };/*
Signature · 1 line
2.30.2
PATCH 3/7 hfs: remove ->writepage
In reply to Christoph Hellwig->writepage is a very inefficient method to write back data, and only used through write_cache_pages or a a fallback when no ->migrate_folio method is present.
Set ->migrate_folio to the generic buffer_head based helper, and stop wiring up ->writepage for hfs_aops.
--- fs/hfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/hfs/inode.c +1 -1
@@ -173,12 +173,12 @@ const struct address_space_operations hfs_aops = { .dirty_folio = block_dirty_folio, .invalidate_folio = block_invalidate_folio, .read_folio = hfs_read_folio, - .writepage = hfs_writepage, .write_begin = hfs_write_begin, .write_end = generic_write_end, .bmap = hfs_bmap, .direct_IO = hfs_direct_IO, .writepages = hfs_writepages, + .migrate_folio = buffer_migrate_folio, };/*
Signature · 1 line
2.30.2
PATCH 4/7 hfsplus: remove ->writepage
In reply to Christoph Hellwig->writepage is a very inefficient method to write back data, and only used through write_cache_pages or a a fallback when no ->migrate_folio method is present.
Set ->migrate_folio to the generic buffer_head based helper, and stop wiring up ->writepage for hfsplus_aops.
--- fs/hfsplus/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/hfsplus/inode.c +1 -1
@@ -170,12 +170,12 @@ const struct address_space_operations hfsplus_aops = { .dirty_folio = block_dirty_folio, .invalidate_folio = block_invalidate_folio, .read_folio = hfsplus_read_folio, - .writepage = hfsplus_writepage, .write_begin = hfsplus_write_begin, .write_end = generic_write_end, .bmap = hfsplus_bmap, .direct_IO = hfsplus_direct_IO, .writepages = hfsplus_writepages, + .migrate_folio = buffer_migrate_folio, };const struct dentry_operations hfsplus_dentry_operations = {
Signature · 1 line
2.30.2
PATCH 5/7 hpfs: remove ->writepage
In reply to Christoph Hellwig->writepage is a very inefficient method to write back data, and only used through write_cache_pages or a a fallback when no ->migrate_folio method is present.
Set ->migrate_folio to the generic buffer_head based helper, and remove the ->writepage implementation.
--- fs/hpfs/file.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
fs/hpfs/file.c +2 -7
@@ -163,11 +163,6 @@ static int hpfs_read_folio(struct file *file, struct folio *folio)return mpage_read_folio (folio, hpfs_get_block); } -static int hpfs_writepage (struct page *page,struct writeback_control *wbc) -{ -return block_write_full_page (page, hpfs_get_block, wbc); -} -static void hpfs_readahead (struct readahead_control *rac) {mpage_readahead (rac, hpfs_get_block);
@@ -248,12 +243,12 @@ const struct address_space_operations hpfs_aops = { .dirty_folio = block_dirty_folio, .invalidate_folio = block_invalidate_folio, .read_folio = hpfs_read_folio, - .writepage = hpfs_writepage, .readahead = hpfs_readahead, .writepages = hpfs_writepages, .write_begin = hpfs_write_begin, .write_end = hpfs_write_end, - .bmap = _hpfs_bmap + .bmap = _hpfs_bmap, + .migrate_folio = buffer_migrate_folio, }; const struct file_operations hpfs_file_ops =
Signature · 1 line
2.30.2
PATCH 6/7 jfs: remove ->writepage
In reply to Christoph Hellwig->writepage is a very inefficient method to write back data, and only used through write_cache_pages or a a fallback when no ->migrate_folio method is present.
Set ->migrate_folio to the generic buffer_head based helper, and remove the ->writepage implementation.
--- fs/jfs/inode.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
fs/jfs/inode.c +1 -6
@@ -264,11 +264,6 @@ int jfs_get_block(struct inode *ip, sector_t lblock,return rc; } -static int jfs_writepage (struct page *page,struct writeback_control *wbc) -{ -return block_write_full_page (page, jfs_get_block, wbc); -} -static int jfs_writepages (struct address_space *mapping,struct writeback_control *wbc) {
@@ -355,12 +350,12 @@ const struct address_space_operations jfs_aops = { .invalidate_folio = block_invalidate_folio, .read_folio = jfs_read_folio, .readahead = jfs_readahead, - .writepage = jfs_writepage, .writepages = jfs_writepages, .write_begin = jfs_write_begin, .write_end = jfs_write_end, .bmap = jfs_bmap, .direct_IO = jfs_direct_IO, + .migrate_folio = buffer_migrate_folio, };/*
Signature · 1 line
2.30.2
PATCH 7/7 omfs: remove ->writepage
In reply to Christoph Hellwig->writepage is a very inefficient method to write back data, and only used through write_cache_pages or a a fallback when no ->migrate_folio method is present.
Set ->migrate_folio to the generic buffer_head based helper, and remove the ->writepage implementation.
--- fs/omfs/file.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
fs/omfs/file.c +1 -6
@@ -294,11 +294,6 @@ static void omfs_readahead(struct readahead_control *rac)mpage_readahead (rac, omfs_get_block); } -static int omfs_writepage (struct page *page,struct writeback_control *wbc) -{ -return block_write_full_page (page, omfs_get_block, wbc); -} -static int omfs_writepages (struct address_space *mapping,struct writeback_control *wbc) {
@@ -375,10 +370,10 @@ const struct address_space_operations omfs_aops = { .invalidate_folio = block_invalidate_folio, .read_folio = omfs_read_folio, .readahead = omfs_readahead, - .writepage = omfs_writepage, .writepages = omfs_writepages, .write_begin = omfs_write_begin, .write_end = generic_write_end, .bmap = omfs_bmap, + .migrate_folio = buffer_migrate_folio, };
Signature · 1 line
2.30.2