All of lore.kernel.org
 help / color / mirror / Atom feed
From: Uday Shankar <ushankar@purestorage.com>
To: Christoph Hellwig <hch@lst.de>
Cc: axboe@kernel.dk, xizhang@purestorage.com, joshi.k@samsung.com,
	anuj20.g@samsung.com, linux-block@vger.kernel.org
Subject: Re: [PATCH] block: fix queue limits checks in blk_rq_map_user_bvec for real
Date: Fri, 25 Oct 2024 12:31:35 -0600	[thread overview]
Message-ID: <ZxvkB/6KBq7XwWAU@dev-ushankar.dev.purestorage.com> (raw)
In-Reply-To: <20241025115818.54976-1-hch@lst.de>

On Fri, Oct 25, 2024 at 01:58:11PM +0200, Christoph Hellwig wrote:
> blk_rq_map_user_bvec currently only has ad-hoc checks for queue limits,
> and the last fix to it enabled valid NVMe I/O to pass, but also allowed
> invalid one for drivers that set a max_segment_size or seg_boundary
> limit.
> 
> Fix it once for all by using the bio_split_rw_at helper from the I/O
> path that indicates if and where a bio would be have to be split to
> adhere to the queue limits, and it it returns a positive value, turn
> that into -EREMOTEIO to retry using the copy path.
> 
> Fixes: 2ff949441802 ("block: fix sanity checks in blk_rq_map_user_bvec")
> Signed-off-by: Christoph Hellwig <hch@lst.de>

This passes my test for NVMe passthrough I/O using a strict subset of a
preregistered buffer (see 2ff949441802 for details).

Tested-by: Uday Shankar <ushankar@purestorage.com>


  reply	other threads:[~2024-10-25 18:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-25 11:58 [PATCH] block: fix queue limits checks in blk_rq_map_user_bvec for real Christoph Hellwig
2024-10-25 18:31 ` Uday Shankar [this message]
2024-10-25 18:52 ` Keith Busch
2024-10-25 20:43 ` John Garry
2024-10-28  9:20   ` Christoph Hellwig

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=ZxvkB/6KBq7XwWAU@dev-ushankar.dev.purestorage.com \
    --to=ushankar@purestorage.com \
    --cc=anuj20.g@samsung.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=joshi.k@samsung.com \
    --cc=linux-block@vger.kernel.org \
    --cc=xizhang@purestorage.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.