Lines Matching defs:cr

30 	struct iscsi_conn_recovery *cr)
33 list_add_tail(&cr->cr_list, &sess->cr_active_list);
41 struct iscsi_conn_recovery *cr)
44 list_add_tail(&cr->cr_list, &sess->cr_inactive_list);
58 struct iscsi_conn_recovery *cr;
61 list_for_each_entry(cr, &sess->cr_inactive_list, cr_list) {
62 if (cr->cid == cid) {
64 return cr;
75 struct iscsi_conn_recovery *cr, *cr_tmp;
78 list_for_each_entry_safe(cr, cr_tmp, &sess->cr_active_list, cr_list) {
79 list_del(&cr->cr_list);
82 spin_lock(&cr->conn_recovery_cmd_lock);
84 &cr->conn_recovery_cmd_list, i_conn_node) {
88 spin_unlock(&cr->conn_recovery_cmd_lock);
90 spin_lock(&cr->conn_recovery_cmd_lock);
92 spin_unlock(&cr->conn_recovery_cmd_lock);
95 kfree(cr);
100 list_for_each_entry_safe(cr, cr_tmp, &sess->cr_inactive_list, cr_list) {
101 list_del(&cr->cr_list);
104 spin_lock(&cr->conn_recovery_cmd_lock);
106 &cr->conn_recovery_cmd_list, i_conn_node) {
110 spin_unlock(&cr->conn_recovery_cmd_lock);
112 spin_lock(&cr->conn_recovery_cmd_lock);
114 spin_unlock(&cr->conn_recovery_cmd_lock);
117 kfree(cr);
123 struct iscsi_conn_recovery *cr,
127 list_del(&cr->cr_list);
134 kfree(cr);
140 struct iscsi_conn_recovery *cr,
144 list_del(&cr->cr_list);
149 * Called with cr->conn_recovery_cmd_lock help.
155 struct iscsi_conn_recovery *cr;
157 if (!cmd->cr) {
162 cr = cmd->cr;
165 return --cr->cmd_count;
169 struct iscsi_conn_recovery *cr,
174 struct iscsit_session *sess = cr->sess;
176 spin_lock(&cr->conn_recovery_cmd_lock);
178 &cr->conn_recovery_cmd_list, i_conn_node) {
189 cmd->stat_sn, cr->cid);
193 spin_unlock(&cr->conn_recovery_cmd_lock);
195 spin_lock(&cr->conn_recovery_cmd_lock);
197 spin_unlock(&cr->conn_recovery_cmd_lock);
201 dropped_count, cr->cid, exp_statsn);
203 if (!cr->cmd_count) {
206 cr->cid, sess->sid);
207 iscsit_remove_inactive_connection_recovery_entry(cr, sess);
208 iscsit_attach_active_connection_recovery_entry(sess, cr);
210 " %hu on SID: %u\n", cr->cid, sess->sid);
211 iscsit_remove_active_connection_recovery_entry(cr, sess);
213 iscsit_remove_inactive_connection_recovery_entry(cr, sess);
214 iscsit_attach_active_connection_recovery_entry(sess, cr);
263 struct iscsi_conn_recovery *cr;
268 * (struct iscsit_cmd->cr) so we need to allocate this before preparing the
271 cr = kzalloc(sizeof(struct iscsi_conn_recovery), GFP_KERNEL);
272 if (!cr) {
277 INIT_LIST_HEAD(&cr->cr_list);
278 INIT_LIST_HEAD(&cr->conn_recovery_cmd_list);
279 spin_lock_init(&cr->conn_recovery_cmd_lock);
350 spin_lock(&cr->conn_recovery_cmd_lock);
351 list_add_tail(&cmd->i_conn_node, &cr->conn_recovery_cmd_list);
352 spin_unlock(&cr->conn_recovery_cmd_lock);
355 cmd->cr = cr;
362 cr->cid = conn->cid;
363 cr->cmd_count = cmd_count;
364 cr->maxrecvdatasegmentlength = conn->conn_ops->MaxRecvDataSegmentLength;
365 cr->maxxmitdatasegmentlength = conn->conn_ops->MaxXmitDataSegmentLength;
366 cr->sess = conn->sess;
368 iscsit_attach_inactive_connection_recovery_entry(conn->sess, cr);