From: Greg KH <gregkh@linuxfoundation.org>
To: zhangshida <starzhangzsd@gmail.com>
Cc: stable@vger.kernel.org, zhangshida@kylinos.cn,
"Matthew Wilcox (Oracle)" <willy@infradead.org>,
Qian Cai <cai@redhat.com>, Brian Foster <bfoster@redhat.com>,
Gao Xiang <hsiangkao@redhat.com>,
"Darrick J . Wong" <darrick.wong@oracle.com>,
Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH 4.19.y] iomap: Set all uptodate bits for an Uptodate page
Date: Fri, 24 Nov 2023 16:02:44 +0000 [thread overview]
Message-ID: <2023112434-sadness-thaw-cae7@gregkh> (raw)
In-Reply-To: <20231116064010.17023-1-zhangshida@kylinos.cn>
On Thu, Nov 16, 2023 at 02:40:10PM +0800, zhangshida wrote:
> From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
>
> commit 4595a298d5563cf76c1d852970f162051fd1a7a6 upstream.
>
> For filesystems with block size < page size, we need to set all the
> per-block uptodate bits if the page was already uptodate at the time
> we create the per-block metadata. This can happen if the page is
> invalidated (eg by a write to drop_caches) but ultimately not removed
> from the page cache.
>
> This is a data corruption issue as page writeback skips blocks which
> are marked !uptodate.
>
> Fixes: 9dc55f1389f9 ("iomap: add support for sub-pagesize buffered I/O without buffer heads")
> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
> Reported-by: Qian Cai <cai@redhat.com>
> Cc: Brian Foster <bfoster@redhat.com>
> Reviewed-by: Gao Xiang <hsiangkao@redhat.com>
> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> Signed-off-by: Shida Zhang <zhangshida@kylinos.cn>
> ---
> fs/iomap.c | 3 +++
> 1 file changed, 3 insertions(+)
Now queued up, thanks.
greg k-h
prev parent reply other threads:[~2023-11-24 16:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-16 6:40 [PATCH 4.19.y] iomap: Set all uptodate bits for an Uptodate page zhangshida
2023-11-24 16:02 ` Greg KH [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=2023112434-sadness-thaw-cae7@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=bfoster@redhat.com \
--cc=cai@redhat.com \
--cc=darrick.wong@oracle.com \
--cc=hch@lst.de \
--cc=hsiangkao@redhat.com \
--cc=stable@vger.kernel.org \
--cc=starzhangzsd@gmail.com \
--cc=willy@infradead.org \
--cc=zhangshida@kylinos.cn \
/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