File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -2008,14 +2008,10 @@ static int blkif_recover(struct blkfront_info *info)
2008
2008
struct request * req , * n ;
2009
2009
int rc ;
2010
2010
struct bio * bio ;
2011
- unsigned int segs ;
2012
2011
struct blkfront_ring_info * rinfo ;
2013
2012
2014
2013
blkfront_gather_backend_features (info );
2015
- /* Reset limits changed by blk_mq_update_nr_hw_queues(). */
2016
2014
blkif_set_queue_limits (info );
2017
- segs = info -> max_indirect_segments ? : BLKIF_MAX_SEGMENTS_PER_REQUEST ;
2018
- blk_queue_max_segments (info -> rq , segs / GRANTS_PER_PSEG );
2019
2015
2020
2016
for_each_rinfo (info , rinfo , r_index ) {
2021
2017
rc = blkfront_setup_indirect (rinfo );
@@ -2035,7 +2031,9 @@ static int blkif_recover(struct blkfront_info *info)
2035
2031
list_for_each_entry_safe (req , n , & info -> requests , queuelist ) {
2036
2032
/* Requeue pending requests (flush or discard) */
2037
2033
list_del_init (& req -> queuelist );
2038
- BUG_ON (req -> nr_phys_segments > segs );
2034
+ BUG_ON (req -> nr_phys_segments >
2035
+ (info -> max_indirect_segments ? :
2036
+ BLKIF_MAX_SEGMENTS_PER_REQUEST ));
2039
2037
blk_mq_requeue_request (req , false);
2040
2038
}
2041
2039
blk_mq_start_stopped_hw_queues (info -> rq , true);
You can’t perform that action at this time.
0 commit comments