From: Ming Lei <ming.lei@redhat.com>
To: Bart Van Assche <bvanassche@acm.org>
Cc: Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
Damien Le Moal <dlemoal@kernel.org>,
Hannes Reinecke <hare@suse.de>
Subject: Re: [PATCH v2 3/5] block: Remove a DMA segment boundary mask check
Date: Fri, 27 Mar 2026 08:52:13 +0800 [thread overview]
Message-ID: <acXUvfopQqMm4Qov@fedora> (raw)
In-Reply-To: <8c956003-e652-4dd0-a4d1-438d82cb543e@acm.org>
On Thu, Mar 26, 2026 at 08:51:46AM -0700, Bart Van Assche wrote:
> On 3/26/26 7:51 AM, Ming Lei wrote:
> > On Wed, Mar 25, 2026 at 02:37:13PM -0700, Bart Van Assche wrote:
> > > diff --git a/block/blk-settings.c b/block/blk-settings.c
> > > index 13f5457f9f4e..8538e50afe2c 100644
> > > --- a/block/blk-settings.c
> > > +++ b/block/blk-settings.c
> > > @@ -447,15 +447,9 @@ int blk_validate_limits(struct queue_limits *lim)
> > > if (!lim->max_discard_segments)
> > > lim->max_discard_segments = 1;
> > > - /*
> > > - * By default there is no limit on the segment boundary alignment,
> > > - * but if there is one it can't be smaller than the page size as
> > > - * that would break all the normal I/O patterns.
> > > - */
> > > + /* By default there is no limit on the segment boundary alignment. */
> > > if (!lim->seg_boundary_mask)
> > > lim->seg_boundary_mask = BLK_SEG_BOUNDARY_MASK;
> > > - if (WARN_ON_ONCE(lim->seg_boundary_mask < BLK_MIN_SEGMENT_SIZE - 1))
> > > - return -EINVAL;
> >
> > Please fold this change into the real code for reducing
> > BLK_MIN_SEGMENT_SIZE, then it provides consistent handling/view about
> > ->seg_boundary_mask and BLK_MIN_SEGMENT_SIZE.
>
> Hmm ... wouldn't combining these two patches into a single patch violate
> the "one change per patch" rule?
OK, looks it is two things.
But why do you remove the check? Looks you just encourage driver to use insane
lim->seg_boundary_mask. IMO, it is just fragile.
Thanks,
Ming
next prev parent reply other threads:[~2026-03-27 0:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-25 21:37 [PATCH v2 0/5] Enable testing small DMA segment sizes Bart Van Assche
2026-03-25 21:37 ` [PATCH v2 1/5] block: Fix a source code comment Bart Van Assche
2026-03-26 14:23 ` Christoph Hellwig
2026-03-26 14:48 ` Ming Lei
2026-03-25 21:37 ` [PATCH v2 2/5] block: Fix the max_user_sectors lower bound Bart Van Assche
2026-03-26 14:23 ` Christoph Hellwig
2026-03-26 14:46 ` Ming Lei
2026-03-25 21:37 ` [PATCH v2 3/5] block: Remove a DMA segment boundary mask check Bart Van Assche
2026-03-26 14:51 ` Ming Lei
2026-03-26 15:51 ` Bart Van Assche
2026-03-27 0:52 ` Ming Lei [this message]
2026-03-27 1:55 ` Bart Van Assche
2026-03-25 21:37 ` [PATCH v2 4/5] block: Reduce the minimum value for the maximum DMA segment size Bart Van Assche
2026-03-25 21:37 ` [PATCH v2 5/5] null_blk: Support configuring " Bart Van Assche
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=acXUvfopQqMm4Qov@fedora \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=dlemoal@kernel.org \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
/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