forked from luck/tmp_suning_uos_patched
elevator: make the rqhash helpers exported
Signed-off-by: Jens Axboe <axboe@fb.com> Reviewed-by: Hannes Reinecke <hare@suse.com>
This commit is contained in:
parent
f04c3df3ef
commit
70b3ea056f
|
@ -248,13 +248,13 @@ static inline void __elv_rqhash_del(struct request *rq)
|
|||
rq->rq_flags &= ~RQF_HASHED;
|
||||
}
|
||||
|
||||
static void elv_rqhash_del(struct request_queue *q, struct request *rq)
|
||||
void elv_rqhash_del(struct request_queue *q, struct request *rq)
|
||||
{
|
||||
if (ELV_ON_HASH(rq))
|
||||
__elv_rqhash_del(rq);
|
||||
}
|
||||
|
||||
static void elv_rqhash_add(struct request_queue *q, struct request *rq)
|
||||
void elv_rqhash_add(struct request_queue *q, struct request *rq)
|
||||
{
|
||||
struct elevator_queue *e = q->elevator;
|
||||
|
||||
|
@ -263,13 +263,13 @@ static void elv_rqhash_add(struct request_queue *q, struct request *rq)
|
|||
rq->rq_flags |= RQF_HASHED;
|
||||
}
|
||||
|
||||
static void elv_rqhash_reposition(struct request_queue *q, struct request *rq)
|
||||
void elv_rqhash_reposition(struct request_queue *q, struct request *rq)
|
||||
{
|
||||
__elv_rqhash_del(rq);
|
||||
elv_rqhash_add(q, rq);
|
||||
}
|
||||
|
||||
static struct request *elv_rqhash_find(struct request_queue *q, sector_t offset)
|
||||
struct request *elv_rqhash_find(struct request_queue *q, sector_t offset)
|
||||
{
|
||||
struct elevator_queue *e = q->elevator;
|
||||
struct hlist_node *next;
|
||||
|
|
|
@ -108,6 +108,11 @@ struct elevator_type
|
|||
|
||||
#define ELV_HASH_BITS 6
|
||||
|
||||
void elv_rqhash_del(struct request_queue *q, struct request *rq);
|
||||
void elv_rqhash_add(struct request_queue *q, struct request *rq);
|
||||
void elv_rqhash_reposition(struct request_queue *q, struct request *rq);
|
||||
struct request *elv_rqhash_find(struct request_queue *q, sector_t offset);
|
||||
|
||||
/*
|
||||
* each queue has an elevator_queue associated with it
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue
Block a user