forked from torvalds/linux
Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
netfs, afs, ceph: Use folios
Convert the netfs helper library and the afs filesystem to use folios.
NOTE: This patch will also need to alter the ceph filesystem, but as that's
not been done that yet, ceph will fail to build.
The patch makes two alterations to the mm headers:
(1) Fix a bug in readahead_folio() where a NULL return from
__readahead_folio() will cause folio_put() to oops.
(2) Add folio_change_private() to change the private data on the folio
without adjusting the page refcount or changing the flag. This
assumes folio_attach_private() was already called.
Notes:
(*) Should I be using page_mapping() or page_file_mapping()?
(*) Can page_endio() be split into two separate functions, one for read
and one for write? If seems a waste of time to conditionally switch
between two different branches.
(*) Is there a better way to implement afs_kill_pages() and
afs_redirty_pages()? I was previously using find_get_pages_contig()
into a pagevec, but that doesn't look like it'll work with folios, so
I'm now calling filemap_get_folio() a lot more - not that it matters
so much, as these are failure paths.
Also, should these be moved into generic code?
(*) Can ->page_mkwrite() see which subpage of a folio got hit?
(*) afs_launder_page() has a bug in it that needs a separate patch.
(*) readahead_folio() puts the page whereas readahead_page() does not.
(*) __filemap_get_folio() should be used instead of
grab_cache_page_write_begin()? What should be done if xa_is_value()
returns true on the value returned by that?
With these changes, afs passes -g quick xfstests.
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Matthew Wilcox (Oracle) <willy@infradead.org>
cc: Jeff Layton <jlayton@kernel.org>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: Ilya Dryomov <idryomov@gmail.com>
cc: linux-afs@lists.infradead.org
cc: ceph-devel@vger.kernel.org
cc: linux-cachefs@redhat.com- Loading branch information
1 parent
8ca403f
commit a665390ce411c517db3f70ae59cdaa874cb914ba
Showing
7 changed files
with
340 additions
and
327 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.