All of lore.kernel.org
 help / color / mirror / Atom feed
From: wolfgang@rohdewald.de (Wolfgang Rohdewald)
Subject: [nvme] Invalid SGL for payload:91648 nents:3
Date: Thu, 04 Jul 2019 14:09:24 +0200	[thread overview]
Message-ID: <10ac1082dc1c5061628a62f9bf2692886f8fbbb0.camel@rohdewald.de> (raw)
In-Reply-To: <20190626012654.GA23698@ming.t460p>

On Mi, 2019-06-26@09:26 +0800, Ming Lei wrote:
> I can understand the issue now, and the issue isn't related with bio
> split, and it is in the normal bio merge code: biovec_phys_mergeable()
> which merges two bios if their bvecs are physically continuous, and not consider
> max segment size limit, which is still applied in blk_bvec_map_sg(),
> then sg with unaligned virt boundary is made.
> 
> Christoph's patch 09324d32d2a08 ("block: force an unlimited segment size on queues
> with a virt boundary") can fix the issue, but another regression might be
> caused because of too big segment size from view of IOMMU.
> 
> And the following patch should fix the 5.1 issue too:
> 
> diff --git a/block/blk-merge.c b/block/blk-merge.c
> index 1c9d4f0f96ea..ff69b7dd2179 100644
> --- a/block/blk-merge.c
> +++ b/block/blk-merge.c
> @@ -60,7 +60,8 @@ static inline bool bio_will_gap(struct request_queue *q,
>          */
>         bio_get_last_bvec(prev, &pb);
>         bio_get_first_bvec(next, &nb);
> -       if (bios_segs_mergeable(q, prev, &pb, &nb))
> +       if (bios_segs_mergeable(q, prev, &pb, &nb) && prev->bi_seg_back_size +
> +                       next->bi_seg_front_size < queue_max_segment_size(q))
>                 return false;
>         return __bvec_gap_to_prev(q, &pb, nb.bv_offset);
>  }

I wonder why this is not in 5.1.16

-- 
mit freundlichen Gr?ssen

Wolfgang Rohdewald

      parent reply	other threads:[~2019-07-04 12:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-25  7:51 [nvme] Invalid SGL for payload:91648 nents:3 Wolfgang Rohdewald
2019-06-25  9:17 ` Ming Lei
     [not found]   ` <CAOSXXT5PgPJqouD0G7qJjar5tmy-9z+wWdFMqpD2K1=5vQZ+HA@mail.gmail.com>
2019-06-25  9:45     ` Ming Lei
2019-06-25  9:50       ` Christoph Hellwig
2019-06-25 10:07         ` Ming Lei
2019-06-25 12:11         ` Wolfgang Rohdewald
2019-06-25 13:29           ` Ming Lei
2019-06-25 15:07             ` Wolfgang Rohdewald
2019-06-26  1:26               ` Ming Lei
2019-06-26 20:18                 ` Wolfgang Rohdewald
2019-07-04 12:09                 ` Wolfgang Rohdewald [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=10ac1082dc1c5061628a62f9bf2692886f8fbbb0.camel@rohdewald.de \
    --to=wolfgang@rohdewald.de \
    /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.