lkml.org 
[lkml]   [2020]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH V4] iomap: add support to track dirty state of sub pages
From
Date

On 2020/09/11 20:05, Matthew Wilcox wrote:
>> @@ -683,7 +736,7 @@ static size_t __iomap_write_end(struct inode *inode,
>> loff_t pos, size_t len,
>> if (unlikely(copied < len && !PageUptodate(page)))
>> return 0;
>> iomap_set_range_uptodate(page, offset_in_page(pos), len);
>> - iomap_set_page_dirty(page);
>> + iomap_set_range_dirty(page, offset_in_page(pos), len);
> I_think_ the call to set_range_uptodate here is now unnecessary. The
> blocks should already have been set uptodate in write_begin. But please
> check!

Hi, Matthew

Sorry it took me so long to get back to this.

I found that set_range_uptodate() might be skipped in write_begin()
in this case:

if (!(flags & IOMAP_WRITE_F_UNSHARE) &&
┊ (from <= poff || from >= poff + plen) &&
┊ (to <= poff || to >= poff + plen))
continue;

And iomap_adjust_read_range() can set 'poff' greater than 'from'
and 'poff + len' less than 'to'.

Thanks
Yu Kuai

\
 
 \ /
  Last update: 2020-09-25 04:31    [W:0.048 / U:0.764 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site