From: Ming Lei <ming.lei@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Damien Le Moal <dlemoal@kernel.org>, Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org, Yi Zhang <yi.zhang@redhat.com>,
Ye Bin <yebin10@huawei.com>
Subject: Re: [PATCH] block: check bio alignment in blk_mq_submit_bio
Date: Wed, 19 Jun 2024 16:37:50 +0800 [thread overview]
Message-ID: <ZnKY3sVTaCGv1BKo@fedora> (raw)
In-Reply-To: <ZnKRZp6pR1xasStB@infradead.org>
On Wed, Jun 19, 2024 at 01:05:58AM -0700, Christoph Hellwig wrote:
> On Wed, Jun 19, 2024 at 03:56:43PM +0800, Ming Lei wrote:
> > If we add the check for all type of IO, it requires ->bi_sector to
> > be meaningful for zero size bio. I am not sure if it is always true,
> > such as RESET_ALL.
>
> meaningful or initialized to zero. Given that bio_init initializes it
> to zero we should generally be fine (and are for BIO_OP_ZONE_RESET_ALL
> for all callers in tree).
Fine, let's fail this kind potential not-well-initialized bio, which is
brittle anyway.
Thanks,
Ming
next prev parent reply other threads:[~2024-06-19 8:38 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
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 [this message]
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=ZnKY3sVTaCGv1BKo@fedora \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=dlemoal@kernel.org \
--cc=hch@infradead.org \
--cc=linux-block@vger.kernel.org \
--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