public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Changheun Lee <nanich.lee@samsung.com>
To: bvanassche@acm.org
Cc: yi.zhang@redhat.com, axboe@kernel.dk, bgoncalv@redhat.com,
	hch@lst.de, jaegeuk@kernel.org, linux-block@vger.kernel.org,
	ming.lei@redhat.com
Subject: Re: [PATCH v2] block: Improve limiting the bio size
Date: Mon, 26 Apr 2021 17:34:42 +0900	[thread overview]
Message-ID: <20210426083442.5831-1-nanich.lee@samsung.com> (raw)
In-Reply-To: <CAHj4cs9E+9n9M6W59LuTWQbbhTzMGgi8KBPaN+cAYC3ypC3dCg@mail.gmail.com>

> Hi Jens/Bart
> CKI reproduced the boot panic issue again with the latest
> linux-block/for-next[1] today, then I checked the patch 'bio: limit
> bio max size'[2] found Bart's fix patch does not fold in that commit,
> could you help recheck it, thanks.
> 
> [1]
> Kernel repo: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
> Commit: ffa77af5731d - Merge branch 'for-5.13/io_uring'
> into for-next
> [2] bio: limit bio max size
> https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/commit/?h=for-next&id=42fb54fbc7072da505c1c59cbe9f8417feb37c27
> 
> Thanks
> Yi
> >
> > Since I had to shuffle patches anyway, I folded in this fix. Thanks
> > Bart.
> >
> > --
> > Jens Axboe
> >

Should we check queue point in bio_max_size()?
__device_add_disk() can be called with "register_queue=false" like as
device_add_disk_no_queue_reg(). How about below?

unsigned int bio_max_size(struct bio *bio)
{
	struct request_queue *q;

	q = (bio->bi_bdev) ? bio->bi_bdev->bd_disk->queue : NULL;
	return q ? q->limits.bio_max_bytes : UINT_MAX;
}

  reply	other threads:[~2021-04-26  8:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-25  4:30 [PATCH v2] block: Improve limiting the bio size Bart Van Assche
2021-04-25  7:36 ` Yi Zhang
2021-04-25 16:19 ` Jens Axboe
2021-04-26  6:32   ` Yi Zhang
2021-04-26  8:34     ` Changheun Lee [this message]
2021-04-26 16:17       ` Bart Van Assche
2021-04-27  0:28         ` Changheun Lee
2021-04-27  2:46           ` Bart Van Assche
2021-04-27  4:12             ` Changheun Lee
2021-04-27 14:59               ` Bart Van Assche
2021-04-28  7:21                 ` Changheun Lee
2021-04-28 15:52                   ` Bart Van Assche
2021-04-29  6:39                     ` Changheun Lee
2021-05-03  9:28                       ` Changheun Lee
2021-05-03 16:35                         ` Bart Van Assche
2021-04-26 12:54     ` Jens Axboe
2021-04-26 23:43       ` Changheun Lee

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=20210426083442.5831-1-nanich.lee@samsung.com \
    --to=nanich.lee@samsung.com \
    --cc=axboe@kernel.dk \
    --cc=bgoncalv@redhat.com \
    --cc=bvanassche@acm.org \
    --cc=hch@lst.de \
    --cc=jaegeuk@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=ming.lei@redhat.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