mbox series

[00/23] Convert write_begin / write_end to take a folio

Message ID 20240717154716.237943-1-willy@infradead.org (mailing list archive)
Headers show
Series Convert write_begin / write_end to take a folio | expand

Message

Matthew Wilcox July 17, 2024, 3:46 p.m. UTC
You can find the full branch at
http://git.infradead.org/?p=users/willy/pagecache.git;a=shortlog;h=refs/heads/write-end
aka
git://git.infradead.org/users/willy/pagecache.git write-end

On top of the ufs, minix, sysv and qnx6 directory handling patches, this
patch series converts us to using folios for write_begin and write_end.
That's the last mention of 'struct page' in several filesystems.

I'd like to get some version of these patches into the 6.12 merge
window.

Matthew Wilcox (Oracle) (23):
  reiserfs: Convert grab_tail_page() to use a folio
  reiserfs: Convert reiserfs_write_begin() to use a folio
  block: Use a folio in blkdev_write_end()
  buffer: Use a folio in generic_write_end()
  nilfs2: Use a folio in nilfs_recover_dsync_blocks()
  ntfs3: Remove reset_log_file()
  buffer: Convert block_write_end() to take a folio
  ecryptfs: Convert ecryptfs_write_end() to use a folio
  ecryptfs: Use a folio in ecryptfs_write_begin()
  f2fs: Convert f2fs_write_end() to use a folio
  f2fs: Convert f2fs_write_begin() to use a folio
  fuse: Convert fuse_write_end() to use a folio
  fuse: Convert fuse_write_begin() to use a folio
  hostfs: Convert hostfs_write_end() to use a folio
  jffs2: Convert jffs2_write_end() to use a folio
  jffs2: Convert jffs2_write_begin() to use a folio
  orangefs: Convert orangefs_write_end() to use a folio
  orangefs: Convert orangefs_write_begin() to use a folio
  vboxsf: Use a folio in vboxsf_write_end()
  fs: Convert aops->write_end to take a folio
  fs: Convert aops->write_begin to take a folio
  ocfs2: Convert ocfs2_write_zero_page to use a folio
  buffer: Convert __block_write_begin() to take a folio

 Documentation/filesystems/locking.rst     |  6 +-
 Documentation/filesystems/vfs.rst         | 12 ++--
 block/fops.c                              | 12 ++--
 drivers/gpu/drm/i915/gem/i915_gem_shmem.c | 47 ++++++------
 fs/adfs/inode.c                           |  5 +-
 fs/affs/file.c                            | 22 +++---
 fs/bcachefs/fs-io-buffered.c              |  8 +--
 fs/bcachefs/fs-io-buffered.h              |  6 +-
 fs/bfs/file.c                             |  4 +-
 fs/buffer.c                               | 46 ++++++------
 fs/ceph/addr.c                            | 13 ++--
 fs/ecryptfs/mmap.c                        | 86 +++++++++++-----------
 fs/exfat/file.c                           |  8 +--
 fs/exfat/inode.c                          |  9 ++-
 fs/ext2/dir.c                             |  4 +-
 fs/ext2/inode.c                           |  8 +--
 fs/ext4/ext4.h                            |  4 +-
 fs/ext4/inline.c                          | 14 ++--
 fs/ext4/inode.c                           | 37 +++++-----
 fs/ext4/verity.c                          |  8 +--
 fs/f2fs/data.c                            | 87 ++++++++++++-----------
 fs/f2fs/super.c                           |  8 +--
 fs/f2fs/verity.c                          |  8 +--
 fs/fat/inode.c                            |  9 ++-
 fs/fuse/file.c                            | 47 ++++++------
 fs/hfs/extent.c                           |  6 +-
 fs/hfs/hfs_fs.h                           |  2 +-
 fs/hfs/inode.c                            |  5 +-
 fs/hfsplus/extents.c                      |  6 +-
 fs/hfsplus/hfsplus_fs.h                   |  2 +-
 fs/hfsplus/inode.c                        |  5 +-
 fs/hostfs/hostfs_kern.c                   | 23 +++---
 fs/hpfs/file.c                            |  9 ++-
 fs/hugetlbfs/inode.c                      |  4 +-
 fs/iomap/buffered-io.c                    |  2 +-
 fs/jffs2/file.c                           | 66 +++++++++--------
 fs/jfs/inode.c                            |  8 +--
 fs/libfs.c                                | 13 ++--
 fs/minix/dir.c                            |  2 +-
 fs/minix/inode.c                          |  6 +-
 fs/namei.c                                | 10 +--
 fs/nfs/file.c                             |  7 +-
 fs/nilfs2/dir.c                           |  4 +-
 fs/nilfs2/inode.c                         | 10 +--
 fs/nilfs2/recovery.c                      | 16 ++---
 fs/ntfs3/file.c                           |  9 ++-
 fs/ntfs3/inode.c                          | 51 ++-----------
 fs/ntfs3/ntfs_fs.h                        |  5 +-
 fs/ocfs2/aops.c                           | 12 ++--
 fs/ocfs2/aops.h                           |  2 +-
 fs/ocfs2/file.c                           | 17 ++---
 fs/ocfs2/mmap.c                           |  6 +-
 fs/omfs/file.c                            |  4 +-
 fs/orangefs/inode.c                       | 39 +++++-----
 fs/reiserfs/inode.c                       | 57 ++++++++-------
 fs/sysv/dir.c                             |  2 +-
 fs/sysv/itree.c                           |  6 +-
 fs/ubifs/file.c                           | 13 ++--
 fs/udf/file.c                             |  2 +-
 fs/udf/inode.c                            | 12 ++--
 fs/ufs/dir.c                              |  2 +-
 fs/ufs/inode.c                            | 10 +--
 fs/vboxsf/file.c                          | 24 +++----
 include/linux/buffer_head.h               | 14 ++--
 include/linux/fs.h                        |  6 +-
 mm/filemap.c                              |  6 +-
 mm/shmem.c                                | 10 ++-
 67 files changed, 482 insertions(+), 551 deletions(-)

Comments

Josef Bacik July 18, 2024, 3:24 p.m. UTC | #1
On Wed, Jul 17, 2024 at 04:46:50PM +0100, Matthew Wilcox (Oracle) wrote:
> You can find the full branch at
> http://git.infradead.org/?p=users/willy/pagecache.git;a=shortlog;h=refs/heads/write-end
> aka
> git://git.infradead.org/users/willy/pagecache.git write-end
> 
> On top of the ufs, minix, sysv and qnx6 directory handling patches, this
> patch series converts us to using folios for write_begin and write_end.
> That's the last mention of 'struct page' in several filesystems.
> 
> I'd like to get some version of these patches into the 6.12 merge
> window.
> 
> Matthew Wilcox (Oracle) (23):
>   reiserfs: Convert grab_tail_page() to use a folio
>   reiserfs: Convert reiserfs_write_begin() to use a folio
>   block: Use a folio in blkdev_write_end()
>   buffer: Use a folio in generic_write_end()
>   nilfs2: Use a folio in nilfs_recover_dsync_blocks()
>   ntfs3: Remove reset_log_file()
>   buffer: Convert block_write_end() to take a folio
>   ecryptfs: Convert ecryptfs_write_end() to use a folio
>   ecryptfs: Use a folio in ecryptfs_write_begin()
>   f2fs: Convert f2fs_write_end() to use a folio
>   f2fs: Convert f2fs_write_begin() to use a folio
>   fuse: Convert fuse_write_end() to use a folio
>   fuse: Convert fuse_write_begin() to use a folio
>   hostfs: Convert hostfs_write_end() to use a folio
>   jffs2: Convert jffs2_write_end() to use a folio
>   jffs2: Convert jffs2_write_begin() to use a folio
>   orangefs: Convert orangefs_write_end() to use a folio
>   orangefs: Convert orangefs_write_begin() to use a folio
>   vboxsf: Use a folio in vboxsf_write_end()
>   fs: Convert aops->write_end to take a folio
>   fs: Convert aops->write_begin to take a folio
>   ocfs2: Convert ocfs2_write_zero_page to use a folio
>   buffer: Convert __block_write_begin() to take a folio

I applied and reviewed this, the per-fs stuff obviously I'm less familiar with,
I mostly just validated it was 1:1 conversion and that the behavior matched the
previous behavior.  You can add

Reviewed-by: Josef Bacik <josef@toxicpanda.com>

to the series.  Thanks,

Josef
Christian Brauner July 23, 2024, 7:49 a.m. UTC | #2
On Wed, Jul 17, 2024 at 04:46:50PM GMT, Matthew Wilcox wrote:
> You can find the full branch at
> http://git.infradead.org/?p=users/willy/pagecache.git;a=shortlog;h=refs/heads/write-end
> aka
> git://git.infradead.org/users/willy/pagecache.git write-end
> 
> On top of the ufs, minix, sysv and qnx6 directory handling patches, this
> patch series converts us to using folios for write_begin and write_end.
> That's the last mention of 'struct page' in several filesystems.
> 
> I'd like to get some version of these patches into the 6.12 merge
> window.

Is it stable enough that I can already pull it from you?
I'd like this to be based on v6.11-rc1.
Matthew Wilcox July 23, 2024, 1:20 p.m. UTC | #3
On Tue, Jul 23, 2024 at 09:49:10AM +0200, Christian Brauner wrote:
> On Wed, Jul 17, 2024 at 04:46:50PM GMT, Matthew Wilcox wrote:
> > You can find the full branch at
> > http://git.infradead.org/?p=users/willy/pagecache.git;a=shortlog;h=refs/heads/write-end
> > aka
> > git://git.infradead.org/users/willy/pagecache.git write-end
> > 
> > On top of the ufs, minix, sysv and qnx6 directory handling patches, this
> > patch series converts us to using folios for write_begin and write_end.
> > That's the last mention of 'struct page' in several filesystems.
> > 
> > I'd like to get some version of these patches into the 6.12 merge
> > window.
> 
> Is it stable enough that I can already pull it from you?
> I'd like this to be based on v6.11-rc1.

It's stable in that it works, but it's still based on linux-next.  I think
it probably depends on a few fs git pulls that are still outstanding.
More awkwardly for merging is that it depends on the four directory
handling patch series, each of which you've put on a separate topic
branch.  So I'm not sure how you want to handle that.
Christian Brauner July 23, 2024, 1:41 p.m. UTC | #4
On Tue, Jul 23, 2024 at 02:20:46PM GMT, Matthew Wilcox wrote:
> On Tue, Jul 23, 2024 at 09:49:10AM +0200, Christian Brauner wrote:
> > On Wed, Jul 17, 2024 at 04:46:50PM GMT, Matthew Wilcox wrote:
> > > You can find the full branch at
> > > http://git.infradead.org/?p=users/willy/pagecache.git;a=shortlog;h=refs/heads/write-end
> > > aka
> > > git://git.infradead.org/users/willy/pagecache.git write-end
> > > 
> > > On top of the ufs, minix, sysv and qnx6 directory handling patches, this
> > > patch series converts us to using folios for write_begin and write_end.
> > > That's the last mention of 'struct page' in several filesystems.
> > > 
> > > I'd like to get some version of these patches into the 6.12 merge
> > > window.
> > 
> > Is it stable enough that I can already pull it from you?
> > I'd like this to be based on v6.11-rc1.
> 
> It's stable in that it works, but it's still based on linux-next.  I think
> it probably depends on a few fs git pulls that are still outstanding.
> More awkwardly for merging is that it depends on the four directory
> handling patch series, each of which you've put on a separate topic
> branch.  So I'm not sure how you want to handle that.

I've put them there before this series here surfaced. But anyway,
there's plenty of options. I can merge all separate topic branches
together in a main branch or I can just pull it all in together. That
depends how complex it turns out to be.
Matthew Wilcox July 23, 2024, 10:54 p.m. UTC | #5
On Tue, Jul 23, 2024 at 03:41:37PM +0200, Christian Brauner wrote:
> On Tue, Jul 23, 2024 at 02:20:46PM GMT, Matthew Wilcox wrote:
> > On Tue, Jul 23, 2024 at 09:49:10AM +0200, Christian Brauner wrote:
> > > On Wed, Jul 17, 2024 at 04:46:50PM GMT, Matthew Wilcox wrote:
> > > > You can find the full branch at
> > > > http://git.infradead.org/?p=users/willy/pagecache.git;a=shortlog;h=refs/heads/write-end
> > > > aka
> > > > git://git.infradead.org/users/willy/pagecache.git write-end
> > > > 
> > > > On top of the ufs, minix, sysv and qnx6 directory handling patches, this
> > > > patch series converts us to using folios for write_begin and write_end.
> > > > That's the last mention of 'struct page' in several filesystems.
> > > > 
> > > > I'd like to get some version of these patches into the 6.12 merge
> > > > window.
> > > 
> > > Is it stable enough that I can already pull it from you?
> > > I'd like this to be based on v6.11-rc1.
> > 
> > It's stable in that it works, but it's still based on linux-next.  I think
> > it probably depends on a few fs git pulls that are still outstanding.
> > More awkwardly for merging is that it depends on the four directory
> > handling patch series, each of which you've put on a separate topic
> > branch.  So I'm not sure how you want to handle that.
> 
> I've put them there before this series here surfaced. But anyway,
> there's plenty of options. I can merge all separate topic branches
> together in a main branch or I can just pull it all in together. That
> depends how complex it turns out to be.

I've rebased to current-ish Linus, updated to commit f45c4246ab18 at
the above URL.  It all seems to work well enough, so I'm not relying on
any later commits.  I can rebase it onto -rc1 when it is tagged, or
you can pull it now if you'd rather.  It's missing the R-b/A-b tags
from Josef & Ryusuke Konishi.
Christian Brauner July 30, 2024, 2:23 p.m. UTC | #6
On Tue, Jul 23, 2024 at 11:54:25PM GMT, Matthew Wilcox wrote:
> On Tue, Jul 23, 2024 at 03:41:37PM +0200, Christian Brauner wrote:
> > On Tue, Jul 23, 2024 at 02:20:46PM GMT, Matthew Wilcox wrote:
> > > On Tue, Jul 23, 2024 at 09:49:10AM +0200, Christian Brauner wrote:
> > > > On Wed, Jul 17, 2024 at 04:46:50PM GMT, Matthew Wilcox wrote:
> > > > > You can find the full branch at
> > > > > http://git.infradead.org/?p=users/willy/pagecache.git;a=shortlog;h=refs/heads/write-end
> > > > > aka
> > > > > git://git.infradead.org/users/willy/pagecache.git write-end
> > > > > 
> > > > > On top of the ufs, minix, sysv and qnx6 directory handling patches, this
> > > > > patch series converts us to using folios for write_begin and write_end.
> > > > > That's the last mention of 'struct page' in several filesystems.
> > > > > 
> > > > > I'd like to get some version of these patches into the 6.12 merge
> > > > > window.
> > > > 
> > > > Is it stable enough that I can already pull it from you?
> > > > I'd like this to be based on v6.11-rc1.
> > > 
> > > It's stable in that it works, but it's still based on linux-next.  I think
> > > it probably depends on a few fs git pulls that are still outstanding.
> > > More awkwardly for merging is that it depends on the four directory
> > > handling patch series, each of which you've put on a separate topic
> > > branch.  So I'm not sure how you want to handle that.
> > 
> > I've put them there before this series here surfaced. But anyway,
> > there's plenty of options. I can merge all separate topic branches
> > together in a main branch or I can just pull it all in together. That
> > depends how complex it turns out to be.
> 
> I've rebased to current-ish Linus, updated to commit f45c4246ab18 at
> the above URL.  It all seems to work well enough, so I'm not relying on
> any later commits.  I can rebase it onto -rc1 when it is tagged, or
> you can pull it now if you'd rather.  It's missing the R-b/A-b tags
> from Josef & Ryusuke Konishi.

I've rebased to v6.11-rc1 and added the missing Acks. I also added your
SoB to "qnx6: Convert directory handling to use kmap_local" which was
missing. Let me know if anything looks wrong. It's in the vfs.folio
branch.