diff options
author | Jens Axboe <axboe@kernel.dk> | 2018-10-29 09:47:17 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-11-07 13:42:33 -0700 |
commit | 1028e4b335665290dc563d5272f3c6b84e7fd66e (patch) | |
tree | ead588720dbbc192c19055ad3639e07764e3ed0b /include/linux/bsg-lib.h | |
parent | 4316b79e4321d4140164e42f228778e5bc66c84f (diff) | |
download | linux-1028e4b335665290dc563d5272f3c6b84e7fd66e.tar.gz linux-1028e4b335665290dc563d5272f3c6b84e7fd66e.tar.bz2 linux-1028e4b335665290dc563d5272f3c6b84e7fd66e.zip |
bsg: move bsg-lib parts outside of request queue
Get rid of the special bsg job fn and timeout handler, move them
into a private bsg_set instead.
Mostly from Christoph, with fixes for error handling and cleanups.
Reviewed-by: Hannes Reinecke <hare@suse.com>
Tested-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/bsg-lib.h')
-rw-r--r-- | include/linux/bsg-lib.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/bsg-lib.h b/include/linux/bsg-lib.h index 9c9b134b1fa5..b356e0006731 100644 --- a/include/linux/bsg-lib.h +++ b/include/linux/bsg-lib.h @@ -31,6 +31,9 @@ struct device; struct scatterlist; struct request_queue; +typedef int (bsg_job_fn) (struct bsg_job *); +typedef enum blk_eh_timer_return (bsg_timeout_fn)(struct request *); + struct bsg_buffer { unsigned int payload_len; int sg_cnt; @@ -72,7 +75,7 @@ struct bsg_job { void bsg_job_done(struct bsg_job *job, int result, unsigned int reply_payload_rcv_len); struct request_queue *bsg_setup_queue(struct device *dev, const char *name, - bsg_job_fn *job_fn, rq_timed_out_fn *timeout, int dd_job_size); + bsg_job_fn *job_fn, bsg_timeout_fn *timeout, int dd_job_size); void bsg_remove_queue(struct request_queue *q); void bsg_job_put(struct bsg_job *job); int __must_check bsg_job_get(struct bsg_job *job); |