From: Jens Axboe <axboe@kernel.dk>
To: Jingbo Xu <jefflexu@linux.alibaba.com>,
"Kirill A. Shutemov" <kirill@shutemov.name>
Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
brauner@kernel.org, linux-kernel@vger.kernel.org,
viro@zeniv.linux.org.uk
Subject: Re: [PATCH 2/2] mm/truncate: don't skip dirty page in folio_unmap_invalidate()
Date: Wed, 19 Feb 2025 09:23:01 -0700 [thread overview]
Message-ID: <65e5ddcd-642b-4671-b814-d4a66b2039d3@kernel.dk> (raw)
In-Reply-To: <b2248d8c-1f80-4806-80fb-cbc40ad713e6@linux.alibaba.com>
On 2/18/25 6:23 PM, Jingbo Xu wrote:
>
>
> On 2/18/25 8:32 PM, Kirill A. Shutemov wrote:
>> On Tue, Feb 18, 2025 at 08:02:09PM +0800, Jingbo Xu wrote:
>>> ... otherwise this is a behavior change for the previous callers of
>>> invalidate_complete_folio2(), e.g. the page invalidation routine.
>>
>> Hm. Shouldn't the check be moved to caller of the helper in mm/filemap.c?
>>
>> Otherwise we would drop pages without writing them back. And lose user's
>> data.
>>
>
> IMHO this check is not needed as the following folio_launder() called
> inside folio_unmap_invalidate() will write back the dirty page.
>
> Hi Jens,
>
> What do you think about it?
Yep agree on that.
--
Jens Axboe
next prev parent reply other threads:[~2025-02-19 16:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-18 12:02 [PATCH 0/2] fixes for uncached IO Jingbo Xu
2025-02-18 12:02 ` [PATCH 1/2] mm/filemap: fix miscalculated file range for filemap_fdatawrite_range_kick() Jingbo Xu
2025-02-19 16:25 ` Jens Axboe
2025-02-18 12:02 ` [PATCH 2/2] mm/truncate: don't skip dirty page in folio_unmap_invalidate() Jingbo Xu
2025-02-18 12:32 ` Kirill A. Shutemov
2025-02-19 1:23 ` Jingbo Xu
2025-02-19 16:23 ` Jens Axboe [this message]
2025-02-19 0:11 ` Dave Chinner
2025-02-19 1:55 ` Jingbo Xu
2025-02-21 11:09 ` [PATCH 0/2] fixes for uncached IO Jingbo Xu
2025-02-21 13:10 ` Christian Brauner
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=65e5ddcd-642b-4671-b814-d4a66b2039d3@kernel.dk \
--to=axboe@kernel.dk \
--cc=brauner@kernel.org \
--cc=jefflexu@linux.alibaba.com \
--cc=kirill@shutemov.name \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=viro@zeniv.linux.org.uk \
/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