lkml.org 
[lkml]   [2021]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 15/21] iomap: Convert iomap_write_begin and iomap_write_end to folios
On Wed, Nov 03, 2021 at 03:15:13AM +0000, Matthew Wilcox wrote:
> On Tue, Nov 02, 2021 at 04:22:15PM -0700, Darrick J. Wong wrote:
> > > + page = folio_file_page(folio, pos >> PAGE_SHIFT);
> >
> > Isn't this only needed in the BUFFER_HEAD case?
>
> Good catch. Want me to fold this in?
>
> @@ -632,12 +631,12 @@ static int iomap_write_begin(const struct iomap_iter *iter, loff_t pos,
> goto out_no_page;
> }
>
> - page = folio_file_page(folio, pos >> PAGE_SHIFT);
> if (srcmap->type == IOMAP_INLINE)
> status = iomap_write_begin_inline(iter, folio);
> - else if (srcmap->flags & IOMAP_F_BUFFER_HEAD)
> + else if (srcmap->flags & IOMAP_F_BUFFER_HEAD) {
> + struct page *page = folio_file_page(folio, pos >> PAGE_SHIFT);
> status = __block_write_begin_int(page, pos, len, NULL, srcmap);

On second thoughts, this is silly. __block_write_begin_int() doesn't
want the precise page (because it constructs buffer_heads and attaches
them to the passed-in page). I should just pass &folio->page here.
And __block_write_begin_int() should be converted to take a folio
at some point.

\
 
 \ /
  Last update: 2021-11-03 13:50    [W:0.530 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site