Re: [PATCH 2/2] blk-mq: ensure a q_usage_counter reference is held when splitting bios

Christoph Hellwig
2024-01-12T05:46:40Z

On Fri, Jan 12, 2024 at 06:22:59AM +0800, Ming Lei wrote:
> On Thu, Jan 11, 2024 at 02:57:05PM +0100, Christoph Hellwig wrote:
> > q_usage_counter is the only thing preventing us from the limits changing
> > under us in __bio_split_to_limits, but blk_mq_submit_bio doesn't hold it.
>
> Can you share why the limits change matters wrt. split? If queue is
> live, both new and old one are supposed to work, such as, we don't
> freeze queue when changing `max_sectors_kb` via sysfs.

Hardware reconfigurations for example, which can happen in nvme for
just about every limit, in SCSI for limits controller by the ULD,
and in quite a few places for disabling write zeroes or discard.