[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7b160e03-28b8-32b0-244c-bfa7f4127434@huawei.com>
Date: Fri, 25 Sep 2020 10:30:22 +0800
From: "yukuai (C)" <yukuai3@...wei.com>
To: Matthew Wilcox <willy@...radead.org>
CC: <hch@...radead.org>, <darrick.wong@...cle.com>,
<david@...morbit.com>, <linux-xfs@...r.kernel.org>,
<linux-fsdevel@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<yi.zhang@...wei.com>
Subject: Re: [RFC PATCH V4] iomap: add support to track dirty state of sub
pages
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
Powered by blists - more mailing lists