aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorXie Yongji <[email protected]>2022-03-04 18:00:58 +0800
committerMichael S. Tsirkin <[email protected]>2022-03-06 06:06:50 -0500
commite030759a1ddcbf61d42b6e996bfeb675e0032d8b (patch)
tree70775c214722e94d19e491586189eccda4d12bdc /tools/perf/scripts/python
parentdacc73ed0b88f1a787ec20385f42ca9dd9eddcd0 (diff)
virtio-blk: Remove BUG_ON() in virtio_queue_rq()
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, let's simply remove the BUG_ON() which has become unnecessary after commit 02746e26c39e("virtio-blk: avoid preallocating big SGL for data"). And the unused vblk->sg_elems can also be removed together. Fixes: 1f23816b8eb8 ("virtio_blk: add discard and write zeroes support") Suggested-by: Christoph Hellwig <[email protected]> Signed-off-by: Xie Yongji <[email protected]> Reviewed-by: Max Gurtovoy <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Michael S. Tsirkin <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions