block: Make q_usage_counter also track legacy requests
authorMing Lei <[email protected]>
Thu, 9 Nov 2017 18:49:53 +0000 (10:49 -0800)
committerJens Axboe <[email protected]>
Sat, 11 Nov 2017 02:53:25 +0000 (19:53 -0700)
commit055f6e18e08f5b7fd98171fce857a0bad87a919d
tree9885288a924bc3655586455a119ac355588c4eb6
parenteb619fdb2d4cb8b3d3419e9113921e87e7daf557
block: Make q_usage_counter also track legacy requests

This patch makes it possible to pause request allocation for
the legacy block layer by calling blk_mq_freeze_queue() and
blk_mq_unfreeze_queue().

Signed-off-by: Ming Lei <[email protected]>
[ bvanassche: Combined two patches into one, edited a comment and made sure
  REQ_NOWAIT is handled properly in blk_old_get_request() ]
Signed-off-by: Bart Van Assche <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Tested-by: Martin Steigerwald <[email protected]>
Tested-by: Oleksandr Natalenko <[email protected]>
Cc: Ming Lei <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
block/blk-core.c
block/blk-mq.c