public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Damien Le Moal <dlemoal@kernel.org>
Cc: Ming Lei <ming.lei@redhat.com>, Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org, Yi Zhang <yi.zhang@redhat.com>,
	Christoph Hellwig <hch@infradead.org>,
	Ye Bin <yebin10@huawei.com>
Subject: Re: [PATCH] block: check bio alignment in blk_mq_submit_bio
Date: Wed, 19 Jun 2024 00:33:49 -0700	[thread overview]
Message-ID: <ZnKJ3d-18rzl32j2@infradead.org> (raw)
In-Reply-To: <355cc36f-e771-4f00-bfb0-0095674d5d49@kernel.org>

On Wed, Jun 19, 2024 at 01:22:27PM +0900, Damien Le Moal wrote:
> static bool bio_unaligned(const struct bio *bio,
> 		          const struct request_queue *q)
> {
> 	unsigned int bs_mask = queue_logical_block_size(q) - 1;

Please avoid use of the queue helpers.  This should be:

	unsigned int bs_mask = bdev_logical_block_size(bio->bi_bdev);


  reply	other threads:[~2024-06-19  7:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-19  3:34 [PATCH] block: check bio alignment in blk_mq_submit_bio Ming Lei
2024-06-19  4:14 ` Damien Le Moal
2024-06-19  4:22   ` Damien Le Moal
2024-06-19  7:33     ` Christoph Hellwig [this message]
2024-06-19  7:58       ` Ming Lei
2024-06-19  8:06         ` Christoph Hellwig
2024-06-19  8:29           ` Ming Lei
2024-06-19  7:56   ` Ming Lei
2024-06-19  8:05     ` Christoph Hellwig
2024-06-19  8:37       ` Ming Lei
2024-06-19  7:50 ` Hannes Reinecke
2024-06-19  8:02   ` Ming Lei

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=ZnKJ3d-18rzl32j2@infradead.org \
    --to=hch@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=dlemoal@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=yebin10@huawei.com \
    --cc=yi.zhang@redhat.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