Lines Matching refs:qr
528 struct iscsi_queue_req *qr; in iscsit_add_cmd_to_immediate_queue() local
530 qr = kmem_cache_zalloc(lio_qr_cache, GFP_ATOMIC); in iscsit_add_cmd_to_immediate_queue()
531 if (!qr) { in iscsit_add_cmd_to_immediate_queue()
536 INIT_LIST_HEAD(&qr->qr_list); in iscsit_add_cmd_to_immediate_queue()
537 qr->cmd = cmd; in iscsit_add_cmd_to_immediate_queue()
538 qr->state = state; in iscsit_add_cmd_to_immediate_queue()
541 list_add_tail(&qr->qr_list, &conn->immed_queue_list); in iscsit_add_cmd_to_immediate_queue()
552 struct iscsi_queue_req *qr; in iscsit_get_cmd_from_immediate_queue() local
559 qr = list_first_entry(&conn->immed_queue_list, in iscsit_get_cmd_from_immediate_queue()
562 list_del(&qr->qr_list); in iscsit_get_cmd_from_immediate_queue()
563 if (qr->cmd) in iscsit_get_cmd_from_immediate_queue()
564 atomic_dec(&qr->cmd->immed_queue_count); in iscsit_get_cmd_from_immediate_queue()
567 return qr; in iscsit_get_cmd_from_immediate_queue()
574 struct iscsi_queue_req *qr, *qr_tmp; in iscsit_remove_cmd_from_immediate_queue() local
582 list_for_each_entry_safe(qr, qr_tmp, &conn->immed_queue_list, qr_list) { in iscsit_remove_cmd_from_immediate_queue()
583 if (qr->cmd != cmd) in iscsit_remove_cmd_from_immediate_queue()
586 atomic_dec(&qr->cmd->immed_queue_count); in iscsit_remove_cmd_from_immediate_queue()
587 list_del(&qr->qr_list); in iscsit_remove_cmd_from_immediate_queue()
588 kmem_cache_free(lio_qr_cache, qr); in iscsit_remove_cmd_from_immediate_queue()
604 struct iscsi_queue_req *qr; in iscsit_add_cmd_to_response_queue() local
606 qr = kmem_cache_zalloc(lio_qr_cache, GFP_ATOMIC); in iscsit_add_cmd_to_response_queue()
607 if (!qr) { in iscsit_add_cmd_to_response_queue()
612 INIT_LIST_HEAD(&qr->qr_list); in iscsit_add_cmd_to_response_queue()
613 qr->cmd = cmd; in iscsit_add_cmd_to_response_queue()
614 qr->state = state; in iscsit_add_cmd_to_response_queue()
617 list_add_tail(&qr->qr_list, &conn->response_queue_list); in iscsit_add_cmd_to_response_queue()
627 struct iscsi_queue_req *qr; in iscsit_get_cmd_from_response_queue() local
635 qr = list_first_entry(&conn->response_queue_list, in iscsit_get_cmd_from_response_queue()
638 list_del(&qr->qr_list); in iscsit_get_cmd_from_response_queue()
639 if (qr->cmd) in iscsit_get_cmd_from_response_queue()
640 atomic_dec(&qr->cmd->response_queue_count); in iscsit_get_cmd_from_response_queue()
643 return qr; in iscsit_get_cmd_from_response_queue()
650 struct iscsi_queue_req *qr, *qr_tmp; in iscsit_remove_cmd_from_response_queue() local
658 list_for_each_entry_safe(qr, qr_tmp, &conn->response_queue_list, in iscsit_remove_cmd_from_response_queue()
660 if (qr->cmd != cmd) in iscsit_remove_cmd_from_response_queue()
663 atomic_dec(&qr->cmd->response_queue_count); in iscsit_remove_cmd_from_response_queue()
664 list_del(&qr->qr_list); in iscsit_remove_cmd_from_response_queue()
665 kmem_cache_free(lio_qr_cache, qr); in iscsit_remove_cmd_from_response_queue()
696 struct iscsi_queue_req *qr, *qr_tmp; in iscsit_free_queue_reqs_for_conn() local
699 list_for_each_entry_safe(qr, qr_tmp, &conn->immed_queue_list, qr_list) { in iscsit_free_queue_reqs_for_conn()
700 list_del(&qr->qr_list); in iscsit_free_queue_reqs_for_conn()
701 if (qr->cmd) in iscsit_free_queue_reqs_for_conn()
702 atomic_dec(&qr->cmd->immed_queue_count); in iscsit_free_queue_reqs_for_conn()
704 kmem_cache_free(lio_qr_cache, qr); in iscsit_free_queue_reqs_for_conn()
709 list_for_each_entry_safe(qr, qr_tmp, &conn->response_queue_list, in iscsit_free_queue_reqs_for_conn()
711 list_del(&qr->qr_list); in iscsit_free_queue_reqs_for_conn()
712 if (qr->cmd) in iscsit_free_queue_reqs_for_conn()
713 atomic_dec(&qr->cmd->response_queue_count); in iscsit_free_queue_reqs_for_conn()
715 kmem_cache_free(lio_qr_cache, qr); in iscsit_free_queue_reqs_for_conn()