archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <>
To: Xianting Tian <>
Cc: <>, <>
Subject: Re: [PATCH] mm/filemap.c: clear page error before actual read
Date: Mon, 20 Apr 2020 20:42:02 -0700	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Tue, 3 Mar 2020 16:25:41 +0800 Xianting Tian <> wrote:

> Mount failure issue happens under the scenario:
> Application totally forked dozens of threads to mount the same
> number of cramfs images separately in docker, but several mounts
> failed with high probability.
> Mount failed due to the checking result of the page
> (read from the superblock of loop dev) is not uptodate after
> wait_on_page_locked(page) returned in function cramfs_read:
>    wait_on_page_locked(page);
>    if (!PageUptodate(page)) {
>       ...
>    }
> The reason of the checking result of the page not uptodate:
> systemd-udevd read the loopX dev before mount, because the status
> of loopX is Lo_unbound at this time, so loop_make_request directly
> trigger the calling of io_end handler end_buffer_async_read, which
> called SetPageError(page). So It caused the page can't be set to
> uptodate in function end_buffer_async_read:
>    if(page_uptodate && !PageError(page)) {
>       SetPageUptodate(page);
>    }

I'm wondering whether we should instead be invalidating the blockdev's
pagecache around the time of the loop binding.

But it's hard to say because loop_make_request() hasn't existed for a
long time.  What kernel version are you working against?

Are you able to test a (much) more recent kernel?  If so, and if the
problem persists, please update your problem description based on the
current kernel code so that others can more easily go in and take a
look, thanks.

  reply	other threads:[~2020-04-21  3:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-03  8:25 [PATCH] mm/filemap.c: clear page error before actual read Xianting Tian
2020-04-21  3:42 ` Andrew Morton [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-03-04 10:47 Xianting Tian
2020-03-04 12:15 ` Matthew Wilcox
2020-03-03 15:09 Xianting Tian
2020-03-03 16:43 ` Matthew Wilcox
2020-03-03  7:18 Xianting Tian

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \

* 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).