mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-06 13:16:22 +00:00
xen-blkfront: don't redundantly set max_sements in blkif_recover
blkif_set_queue_limits already sets the max_sements limits, so don't do it a second time. Also remove a comment about a long fixe bug in blk_mq_update_nr_hw_queues. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Roger Pau Monné <roger.pau@citrix.com> Link: https://lore.kernel.org/r/20240221125845.3610668-4-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
738be13632
commit
4f81b87d91
@ -2008,14 +2008,10 @@ static int blkif_recover(struct blkfront_info *info)
|
|||||||
struct request *req, *n;
|
struct request *req, *n;
|
||||||
int rc;
|
int rc;
|
||||||
struct bio *bio;
|
struct bio *bio;
|
||||||
unsigned int segs;
|
|
||||||
struct blkfront_ring_info *rinfo;
|
struct blkfront_ring_info *rinfo;
|
||||||
|
|
||||||
blkfront_gather_backend_features(info);
|
blkfront_gather_backend_features(info);
|
||||||
/* Reset limits changed by blk_mq_update_nr_hw_queues(). */
|
|
||||||
blkif_set_queue_limits(info);
|
blkif_set_queue_limits(info);
|
||||||
segs = info->max_indirect_segments ? : BLKIF_MAX_SEGMENTS_PER_REQUEST;
|
|
||||||
blk_queue_max_segments(info->rq, segs / GRANTS_PER_PSEG);
|
|
||||||
|
|
||||||
for_each_rinfo(info, rinfo, r_index) {
|
for_each_rinfo(info, rinfo, r_index) {
|
||||||
rc = blkfront_setup_indirect(rinfo);
|
rc = blkfront_setup_indirect(rinfo);
|
||||||
@ -2035,7 +2031,9 @@ static int blkif_recover(struct blkfront_info *info)
|
|||||||
list_for_each_entry_safe(req, n, &info->requests, queuelist) {
|
list_for_each_entry_safe(req, n, &info->requests, queuelist) {
|
||||||
/* Requeue pending requests (flush or discard) */
|
/* Requeue pending requests (flush or discard) */
|
||||||
list_del_init(&req->queuelist);
|
list_del_init(&req->queuelist);
|
||||||
BUG_ON(req->nr_phys_segments > segs);
|
BUG_ON(req->nr_phys_segments >
|
||||||
|
(info->max_indirect_segments ? :
|
||||||
|
BLKIF_MAX_SEGMENTS_PER_REQUEST));
|
||||||
blk_mq_requeue_request(req, false);
|
blk_mq_requeue_request(req, false);
|
||||||
}
|
}
|
||||||
blk_mq_start_stopped_hw_queues(info->rq, true);
|
blk_mq_start_stopped_hw_queues(info->rq, true);
|
||||||
|
Loading…
Reference in New Issue
Block a user