* Re: [PATCH] virtio-blk: Check the max discard segment for discard request
[not found] <20220223133627.102-1-xieyongji@bytedance.com>
@ 2022-02-24 13:34 ` Christoph Hellwig
0 siblings, 0 replies; only message in thread
From: Christoph Hellwig @ 2022-02-24 13:34 UTC (permalink / raw)
To: Xie Yongji; +Cc: axboe, linux-block, virtualization, mst
On Wed, Feb 23, 2022 at 09:36:27PM +0800, Xie Yongji wrote:
> Currently we have a BUG_ON() to make sure the number of sg list
> does not exceed queue_max_segments() in virtio_queue_rq().
> However, the block layer uses queue_max_discard_segments()
> instead of queue_max_segments() to limit the sg list for
> discard requests. So the BUG_ON() might be triggered if
> virtio-blk device reports a larger value for max discard
> segment than queue_max_segments(). To fix it, this patch
> checks the max discard segment for the discard request
> in the BUG_ON() instead.
This looks god, but jut removing the BUG_ON might be even better.
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-02-24 13:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20220223133627.102-1-xieyongji@bytedance.com>
2022-02-24 13:34 ` [PATCH] virtio-blk: Check the max discard segment for discard request Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).