Linux-Fsdevel Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "yukuai (C)" <yukuai3@huawei.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: <hch@infradead.org>, <darrick.wong@oracle.com>,
<david@fromorbit.com>, <linux-xfs@vger.kernel.org>,
<linux-fsdevel@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<yi.zhang@huawei.com>
Subject: Re: [RFC PATCH V4] iomap: add support to track dirty state of sub pages
Date: Fri, 25 Sep 2020 10:30:22 +0800 [thread overview]
Message-ID: <7b160e03-28b8-32b0-244c-bfa7f4127434@huawei.com> (raw)
In-Reply-To: <20200911120529.GZ6583@casper.infradead.org>
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
prev parent reply other threads:[~2020-09-25 2:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-21 12:33 [RFC PATCH V4] iomap: add support to track dirty state of sub pages Yu Kuai
2020-08-21 12:44 ` Matthew Wilcox
2020-08-21 12:46 ` [PATCH 1/3] iomap: Use kzalloc to allocate iomap_page Matthew Wilcox (Oracle)
2020-08-21 12:46 ` [PATCH 2/3] iomap: Use bitmap ops to set uptodate bits Matthew Wilcox (Oracle)
2020-08-22 5:59 ` Christoph Hellwig
2020-08-21 12:46 ` [PATCH 3/3] iomap: Support arbitrarily many blocks per page Matthew Wilcox (Oracle)
2020-08-21 12:48 ` Matthew Wilcox
2020-08-22 6:01 ` Christoph Hellwig
2020-08-22 5:57 ` [PATCH 1/3] iomap: Use kzalloc to allocate iomap_page Christoph Hellwig
2020-09-11 8:27 ` [RFC PATCH V4] iomap: add support to track dirty state of sub pages yukuai (C)
2020-09-11 8:35 ` yukuai (C)
2020-09-11 12:05 ` Matthew Wilcox
2020-09-25 2:30 ` yukuai (C) [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7b160e03-28b8-32b0-244c-bfa7f4127434@huawei.com \
--to=yukuai3@huawei.com \
--cc=darrick.wong@oracle.com \
--cc=david@fromorbit.com \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=willy@infradead.org \
--cc=yi.zhang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).