Lines Matching refs:q
48 struct elevator_type *et = icq->q->elevator->type; in ioc_exit_icq()
76 struct request_queue *q = icq->q; in ioc_destroy_icq() local
77 struct elevator_type *et = q->elevator->type; in ioc_destroy_icq()
80 lockdep_assert_held(&q->queue_lock); in ioc_destroy_icq()
85 radix_tree_delete(&ioc->icq_tree, icq->q->id); in ioc_destroy_icq()
121 struct request_queue *q = icq->q; in ioc_release_fn() local
123 if (spin_trylock(&q->queue_lock)) { in ioc_release_fn()
125 spin_unlock(&q->queue_lock); in ioc_release_fn()
132 spin_lock(&q->queue_lock); in ioc_release_fn()
137 spin_unlock(&q->queue_lock); in ioc_release_fn()
171 void ioc_clear_queue(struct request_queue *q) in ioc_clear_queue() argument
173 spin_lock_irq(&q->queue_lock); in ioc_clear_queue()
174 while (!list_empty(&q->icq_list)) { in ioc_clear_queue()
176 list_first_entry(&q->icq_list, struct io_cq, q_node); in ioc_clear_queue()
186 spin_unlock_irq(&q->queue_lock); in ioc_clear_queue()
324 struct io_cq *ioc_lookup_icq(struct request_queue *q) in ioc_lookup_icq() argument
329 lockdep_assert_held(&q->queue_lock); in ioc_lookup_icq()
339 if (icq && icq->q == q) in ioc_lookup_icq()
342 icq = radix_tree_lookup(&ioc->icq_tree, q->id); in ioc_lookup_icq()
343 if (icq && icq->q == q) in ioc_lookup_icq()
363 static struct io_cq *ioc_create_icq(struct request_queue *q) in ioc_create_icq() argument
366 struct elevator_type *et = q->elevator->type; in ioc_create_icq()
371 q->node); in ioc_create_icq()
381 icq->q = q; in ioc_create_icq()
386 spin_lock_irq(&q->queue_lock); in ioc_create_icq()
389 if (likely(!radix_tree_insert(&ioc->icq_tree, q->id, icq))) { in ioc_create_icq()
391 list_add(&icq->q_node, &q->icq_list); in ioc_create_icq()
396 icq = ioc_lookup_icq(q); in ioc_create_icq()
402 spin_unlock_irq(&q->queue_lock); in ioc_create_icq()
407 struct io_cq *ioc_find_get_icq(struct request_queue *q) in ioc_find_get_icq() argument
413 ioc = alloc_io_context(GFP_ATOMIC, q->node); in ioc_find_get_icq()
430 spin_lock_irq(&q->queue_lock); in ioc_find_get_icq()
431 icq = ioc_lookup_icq(q); in ioc_find_get_icq()
432 spin_unlock_irq(&q->queue_lock); in ioc_find_get_icq()
436 icq = ioc_create_icq(q); in ioc_find_get_icq()