lkml.org 
[lkml]   [2021]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 1/2] iomap: support tail packing inline read
    On Sat, Jul 17, 2021 at 09:38:18PM +0800, Gao Xiang wrote:
    > Sorry about some late. I've revised a version based on Christoph's
    > version and Matthew's thought above. I've preliminary checked with
    > EROFS, if it does make sense, please kindly help check on the gfs2
    > side as well..

    I don't understand how this bit works:

    > struct page *page = ctx->cur_page;
    > - struct iomap_page *iop;
    > + struct iomap_page *iop = NULL;
    > bool same_page = false, is_contig = false;
    > loff_t orig_pos = pos;
    > unsigned poff, plen;
    > sector_t sector;
    >
    > - if (iomap->type == IOMAP_INLINE) {
    > - WARN_ON_ONCE(pos);
    > - iomap_read_inline_data(inode, page, iomap);
    > - return PAGE_SIZE;
    > - }
    > + if (iomap->type == IOMAP_INLINE && !pos)
    > + WARN_ON_ONCE(to_iomap_page(page) != NULL);
    > + else
    > + iop = iomap_page_create(inode, page);

    Imagine you have a file with bytes 0-2047 in an extent which is !INLINE
    and bytes 2048-2051 in the INLINE extent. When you read the page, first
    you create an iop for the !INLINE extent. Then this function is called
    again for the INLINE extent and you'll hit the WARN_ON_ONCE. No?

    \
     
     \ /
      Last update: 2021-07-17 17:03    [W:4.072 / U:0.280 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site