Thread (18 messages) 18 messages, 5 authors, 2023-03-21

Re: [RFC PATCH 2/3] mpage: use bio_for_each_folio_all in mpage_end_io()

From: Matthew Wilcox <willy@infradead.org>
Date: 2023-03-15 16:10:18
Also in: linux-fsdevel, linux-mm, lkml

On Wed, Mar 15, 2023 at 03:52:15PM +0100, Hannes Reinecke wrote:
On 3/15/23 13:32, Pankaj Raghav wrote:
quoted
Use bio_for_each_folio_all to iterate through folios in a bio so that
the folios can be directly passed to the folio_endio() function.
+	bio_for_each_folio_all(fi, bio)
+		folio_endio(fi.folio, bio_op(bio),
+			    blk_status_to_errno(bio->bi_status));
  	bio_put(bio);
  }
Ah. Here it is.

I would suggest merge these two patches.
The right way to have handled this patch series was:

1. Introduce a new folio_endio() [but see Christoph's mail on why we
shouldn't do that]
2-n convert callers to use folios directly
n+1 remove page_endio() entirely.

Note that patch n+1 might not be part of this patch series; sometimes
it takes a while to convert all callers to use folios.

I very much dislike the way this was done by pushing the page_folio()
call into each of the callers because it makes the entire series hard to
review.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help