linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Uday Shankar <ushankar@purestorage.com>
Cc: Jens Axboe <axboe@kernel.dk>, Alasdair Kergon <agk@redhat.com>,
	Mike Snitzer <snitzer@kernel.org>,
	linux-block@vger.kernel.org, dm-devel@redhat.com
Subject: Re: [PATCH] blk-mq: enforce op-specific segment limits in blk_insert_cloned_request
Date: Wed, 15 Feb 2023 22:09:36 -0800	[thread overview]
Message-ID: <Y+3IoOd02iFGNLnC@infradead.org> (raw)
In-Reply-To: <20230215201507.494152-1-ushankar@purestorage.com>

On Wed, Feb 15, 2023 at 01:15:08PM -0700, Uday Shankar wrote:
> The block layer might merge together discard requests up until the
> max_discard_segments limit is hit, but blk_insert_cloned_request checks
> the segment count against max_segments regardless of the req op. This
> can result in errors like the following when discards are issued through
> a DM device and max_discard_segments exceeds max_segments for the queue
> of the chosen underlying device.
> 
> blk_insert_cloned_request: over max segments limit. (256 > 129)
> 
> Fix this by looking at the req_op and enforcing the appropriate segment
> limit - max_discard_segments for REQ_OP_DISCARDs and max_segments for
> everything else.

I'd just remove the debug check entirely.


  reply	other threads:[~2023-02-16  6:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-15 20:15 [PATCH] blk-mq: enforce op-specific segment limits in blk_insert_cloned_request Uday Shankar
2023-02-16  6:09 ` Christoph Hellwig [this message]
2023-02-16 19:27   ` Uday Shankar
2023-02-17  0:13     ` Mike Snitzer
2023-02-17 16:16     ` [PATCH] " Christoph Hellwig
2023-02-17 16:43       ` Mike Snitzer
2023-02-17 21:41         ` Uday Shankar
2023-02-16 13:06 ` [PATCH] " kernel test robot

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=Y+3IoOd02iFGNLnC@infradead.org \
    --to=hch@infradead.org \
    --cc=agk@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=dm-devel@redhat.com \
    --cc=linux-block@vger.kernel.org \
    --cc=snitzer@kernel.org \
    --cc=ushankar@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 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).