blk.h (bf61c8840efe60fd8f91446860b63338fb424158) | blk.h (320ae51feed5c2f13664aa05a76bec198967e04d) |
---|---|
1#ifndef BLK_INTERNAL_H 2#define BLK_INTERNAL_H 3 4#include <linux/idr.h> 5 6/* Amount of time in which a process may batch requests */ 7#define BLK_BATCH_TIME (HZ/50UL) 8 9/* Number of requests a "batching" process may submit */ 10#define BLK_BATCH_REQ 32 11 12extern struct kmem_cache *blk_requestq_cachep; | 1#ifndef BLK_INTERNAL_H 2#define BLK_INTERNAL_H 3 4#include <linux/idr.h> 5 6/* Amount of time in which a process may batch requests */ 7#define BLK_BATCH_TIME (HZ/50UL) 8 9/* Number of requests a "batching" process may submit */ 10#define BLK_BATCH_REQ 32 11 12extern struct kmem_cache *blk_requestq_cachep; |
13extern struct kmem_cache *request_cachep; |
|
13extern struct kobj_type blk_queue_ktype; 14extern struct ida blk_queue_ida; 15 16static inline void __blk_get_queue(struct request_queue *q) 17{ 18 kobject_get(&q->kobj); 19} 20 --- 8 unchanged lines hidden (view full) --- 29void blk_queue_bypass_start(struct request_queue *q); 30void blk_queue_bypass_end(struct request_queue *q); 31void blk_dequeue_request(struct request *rq); 32void __blk_queue_free_tags(struct request_queue *q); 33bool __blk_end_bidi_request(struct request *rq, int error, 34 unsigned int nr_bytes, unsigned int bidi_bytes); 35 36void blk_rq_timed_out_timer(unsigned long data); | 14extern struct kobj_type blk_queue_ktype; 15extern struct ida blk_queue_ida; 16 17static inline void __blk_get_queue(struct request_queue *q) 18{ 19 kobject_get(&q->kobj); 20} 21 --- 8 unchanged lines hidden (view full) --- 30void blk_queue_bypass_start(struct request_queue *q); 31void blk_queue_bypass_end(struct request_queue *q); 32void blk_dequeue_request(struct request *rq); 33void __blk_queue_free_tags(struct request_queue *q); 34bool __blk_end_bidi_request(struct request *rq, int error, 35 unsigned int nr_bytes, unsigned int bidi_bytes); 36 37void blk_rq_timed_out_timer(unsigned long data); |
38void blk_rq_check_expired(struct request *rq, unsigned long *next_timeout, 39 unsigned int *next_set); 40void __blk_add_timer(struct request *req, struct list_head *timeout_list); |
|
37void blk_delete_timer(struct request *); 38void blk_add_timer(struct request *); 39 | 41void blk_delete_timer(struct request *); 42void blk_add_timer(struct request *); 43 |
44 45bool bio_attempt_front_merge(struct request_queue *q, struct request *req, 46 struct bio *bio); 47bool bio_attempt_back_merge(struct request_queue *q, struct request *req, 48 struct bio *bio); 49bool blk_attempt_plug_merge(struct request_queue *q, struct bio *bio, 50 unsigned int *request_count); 51 52void blk_account_io_start(struct request *req, bool new_io); 53void blk_account_io_completion(struct request *req, unsigned int bytes); 54void blk_account_io_done(struct request *req); 55 |
|
40/* 41 * Internal atomic flags for request handling 42 */ 43enum rq_atomic_flags { 44 REQ_ATOM_COMPLETE = 0, | 56/* 57 * Internal atomic flags for request handling 58 */ 59enum rq_atomic_flags { 60 REQ_ATOM_COMPLETE = 0, |
61 REQ_ATOM_STARTED, |
|
45}; 46 47/* 48 * EH timer and IO completion will both attempt to 'grab' the request, make 49 * sure that only one of them succeeds 50 */ 51static inline int blk_mark_rq_complete(struct request *rq) 52{ --- 182 unchanged lines hidden --- | 62}; 63 64/* 65 * EH timer and IO completion will both attempt to 'grab' the request, make 66 * sure that only one of them succeeds 67 */ 68static inline int blk_mark_rq_complete(struct request *rq) 69{ --- 182 unchanged lines hidden --- |