mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
block: make blk_poll() take a parameter on whether to spin or not
blk_poll() has always kept spinning until it found an IO. This is fine for SYNC polling, since we need to find one request we have pending, but in preparation for ASYNC polling it can be beneficial to just check if we have any entries available or not. Existing callers are converted to pass in 'spin == true', to retain the old behavior. Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
e7d9439107
commit
0a1b8b87d0
8 changed files with 18 additions and 15 deletions
|
@ -283,7 +283,7 @@ static inline unsigned short req_get_ioprio(struct request *req)
|
|||
struct blk_queue_ctx;
|
||||
|
||||
typedef blk_qc_t (make_request_fn) (struct request_queue *q, struct bio *bio);
|
||||
typedef int (poll_q_fn) (struct request_queue *q, blk_qc_t);
|
||||
typedef int (poll_q_fn) (struct request_queue *q, blk_qc_t, bool spin);
|
||||
|
||||
struct bio_vec;
|
||||
typedef int (dma_drain_needed_fn)(struct request *);
|
||||
|
@ -867,7 +867,7 @@ extern void blk_execute_rq_nowait(struct request_queue *, struct gendisk *,
|
|||
int blk_status_to_errno(blk_status_t status);
|
||||
blk_status_t errno_to_blk_status(int errno);
|
||||
|
||||
int blk_poll(struct request_queue *q, blk_qc_t cookie);
|
||||
int blk_poll(struct request_queue *q, blk_qc_t cookie, bool spin);
|
||||
|
||||
static inline struct request_queue *bdev_get_queue(struct block_device *bdev)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue