All of lore.kernel.org
 help / color / mirror / Atom feed
From: Song Liu <song@kernel.org>
To: "Paweł Wiejacha" <pawel.wiejacha@rtbhouse.com>
Cc: Guoqing Jiang <jgq516@gmail.com>,
	linux-raid <linux-raid@vger.kernel.org>,
	Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Subject: Re: PROBLEM: double fault in md_end_io
Date: Wed, 5 May 2021 22:48:44 -0700	[thread overview]
Message-ID: <CAPhsuW7ZzhXtg5MikTG+NtpQbYBZfpU5tDWzbZXDF4bhj9wwdA@mail.gmail.com> (raw)
In-Reply-To: <CADLTsw340wuEoX02ad-M6mN_48uDdnkj0dZSJGYMFrjgB+y80Q@mail.gmail.com>

Hi Paweł,

On Tue, May 4, 2021 at 2:18 PM Paweł Wiejacha
<pawel.wiejacha@rtbhouse.com> wrote:
>
> Guoqing's patch fixes the problem. Here's the actual patch I am using:

Thanks for running the tests.

Hi Guoqing,

Could you please send official patch for this fix?

Thanks,
Song

>
> -static void bio_chain_endio(struct bio *bio)
> +void bio_chain_endio(struct bio *bio)
>  {
>     bio_endio(__bio_chain_endio(bio));
>  }
> +EXPORT_SYMBOL(bio_chain_endio);
>
>  /**
>   * bio_chain - chain bio completions
> diff --git drivers/md/md.c drivers/md/md.c
> index 04384452a7ab..f157bd6e0478 100644
> --- drivers/md/md.c
> +++ drivers/md/md.c
> @@ -507,7 +507,8 @@ static blk_qc_t md_submit_bio(struct bio *bio)
>         return BLK_QC_T_NONE;
>     }
>
> -   if (bio->bi_end_io != md_end_io) {
> +   if (bio->bi_end_io != md_end_io && bio->bi_end_io !=
> +                bio_chain_endio) {
>         struct md_io *md_io;
>
>         md_io = mempool_alloc(&mddev->md_io_pool, GFP_NOIO);
> diff --git include/linux/bio.h include/linux/bio.h
> index 1edda614f7ce..bfb5bd0be397 100644
> --- include/linux/bio.h
> +++ include/linux/bio.h
> @@ -427,6 +427,7 @@ static inline struct bio *bio_kmalloc(gfp_t
> gfp_mask, unsigned int nr_iovecs)
>  extern blk_qc_t submit_bio(struct bio *);
>
>  extern void bio_endio(struct bio *);
> +extern void bio_chain_endio(struct bio *bio);

[...]

  reply	other threads:[~2021-05-06  5:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-09 21:40 PROBLEM: double fault in md_end_io Paweł Wiejacha
2021-04-12  6:48 ` Song Liu
2021-04-13 12:05   ` Paweł Wiejacha
2021-04-15  0:36     ` Song Liu
2021-04-15  6:35       ` Song Liu
2021-04-15 15:35         ` Paweł Wiejacha
2021-04-22 15:40           ` Paweł Wiejacha
2021-04-23  2:36 ` Guoqing Jiang
2021-04-23  6:44   ` Song Liu
2021-05-04 21:17     ` Paweł Wiejacha
2021-05-06  5:48       ` Song Liu [this message]
2021-05-06 23:46         ` Guoqing Jiang
2021-05-08  1:17           ` Guoqing Jiang

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=CAPhsuW7ZzhXtg5MikTG+NtpQbYBZfpU5tDWzbZXDF4bhj9wwdA@mail.gmail.com \
    --to=song@kernel.org \
    --cc=artur.paszkiewicz@intel.com \
    --cc=jgq516@gmail.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=pawel.wiejacha@rtbhouse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.