Thread (68 messages) 68 messages, 3 authors, 2021-06-16

Re: [PATCH v11 26/33] mm/writeback: Add folio_wait_writeback()

From: Matthew Wilcox <willy@infradead.org>
Date: 2021-06-16 11:56:01
Also in: linux-fsdevel, lkml

On Wed, Jun 16, 2021 at 11:30:46AM +0100, David Howells wrote:
Matthew Wilcox (Oracle) [off-list ref] wrote:
quoted
+	struct page *page = &folio->page;
Isn't that a layering violation?  Should it be something like:

	struct page *page = folio_head();

or:

	struct page *page = folio_subpage(0);
It's not a layering violation, but it is bad style.  It indicates the
function is incompletely converted to folios and probably isn't actually
folio-safe.  After about a dozen more commits, it's possible to finish
the conversion in afs_page_mkwrite(), and I do so here:

https://git.infradead.org/users/willy/pagecache.git/commitdiff/f49f546f4ad83c8a6fec861af5f9d0825b850abc

It's still not 100% clean as afs_page_dirty() expects a head|base page
instead of a folio, so there's more cleanup required.  Also
trace_afs_page_dirty() continues to take a page instead of a folio,
but that tends to not actually be a problem.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help