Re: PROBLEM: double fault in md_end_io

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Paweł,

On Tue, May 4, 2021 at 2:18 PM Paweł Wiejacha
<pawel.wiejacha@xxxxxxxxxxxx> 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);

[...]




[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux