lkml.org 
[lkml]   [2020]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [RFC] iomap: fix race between readahead and direct write
    From
    Date


    On 2020/1/19 7:08, Matthew Wilcox wrote:
    > It's worth noting that my patch series from earlier this week to
    > redesign the readahead API will fix this problem. Direct write will block
    > on the locked pages in the page cache.

    Thank you for your response!

    In this case, direct write finish while page do not exist in the page
    cache. This is the fundamental condition of the race, because readahead
    won't allocate page if page exist in page cache.

    By the way, in the current logic, if page exist in page cache, direct
    write need to hold lock for page in invalidate_inode_pages2_range().

    Thanks!
    Yu Kuai




    \
     
     \ /
      Last update: 2020-01-19 02:35    [W:8.291 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site