From: Filipe Manana <fdmanana@kernel.org>
To: Josef Bacik <josef@toxicpanda.com>
Cc: linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH 1/2] btrfs: do not SetPageError on a read error for extent buffers
Date: Mon, 14 Feb 2022 10:47:58 +0000 [thread overview]
Message-ID: <YgozXnBw6EN7X82j@debian9.Home> (raw)
In-Reply-To: <0682dfc75f9d32f4cb4152f6547a5fc4ef23d575.1644596294.git.josef@toxicpanda.com>
On Fri, Feb 11, 2022 at 11:24:38AM -0500, Josef Bacik wrote:
> For reads the page is marked !uptodate and that indicates that there was
> a problem. We should only be using SetPageError for write errors, and
> in fact do that everywhere except for extent buffer reads.
We are also doing that for data page reads, at end_page_read() - we clear
the uptodate bit from the page and then set the error bit as well. So it
needs to be fixed as well.
> Fix this so
> we maintain that PageError == write error.
>
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>
> ---
> fs/btrfs/extent_io.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
> index 16b6820c913d..bb3c29984fcd 100644
> --- a/fs/btrfs/extent_io.c
> +++ b/fs/btrfs/extent_io.c
> @@ -6671,7 +6671,6 @@ int read_extent_buffer_pages(struct extent_buffer *eb, int wait, int mirror_num)
> * i.e unlock page/set error bit.
> */
> ret = err;
> - SetPageError(page);
The comment above also needs to be upodated, and it mentions we
must set the error bit on the page.
Thanks.
> unlock_page(page);
> atomic_dec(&eb->io_pages);
> }
> --
> 2.26.3
>
next prev parent reply other threads:[~2022-02-14 11:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-11 16:24 [PATCH 0/2] Fix another !PageUptodate related warning Josef Bacik
2022-02-11 16:24 ` [PATCH 1/2] btrfs: do not SetPageError on a read error for extent buffers Josef Bacik
2022-02-14 10:47 ` Filipe Manana [this message]
2022-02-11 16:24 ` [PATCH 2/2] btrfs: do not WARN_ON() if we have PageError set Josef Bacik
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=YgozXnBw6EN7X82j@debian9.Home \
--to=fdmanana@kernel.org \
--cc=josef@toxicpanda.com \
--cc=kernel-team@fb.com \
--cc=linux-btrfs@vger.kernel.org \
/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