• Home
  • Raw
  • Download

Lines Matching full:head

75 	con = msg_wq->head.peer;  in msg_release()
76 idr_remove(&con->msg_idr, msg_wq->head.msg_id); in msg_release()
88 kref_put_lock(&msg_wq->head.ref, msg_release, in msg_put()
89 &msg_wq->head.peer->idr_lock); in msg_put()
128 struct hmdfs_head_cmd *head = msg->head; in hmdfs_sendmessage() local
133 head->operations.command); in hmdfs_sendmessage()
139 head->operations.command); in hmdfs_sendmessage()
151 node->device_id, head->operations.command); in hmdfs_sendmessage()
168 node->device_id, head->operations.command); in hmdfs_sendmessage()
193 statistic_con_sb_dirty(node, &head->operations); in hmdfs_sendmessage()
195 if (head->operations.cmd_flag == C_REQUEST) in hmdfs_sendmessage()
197 head->operations.command, ret); in hmdfs_sendmessage()
198 else if (head->operations.cmd_flag == C_RESPONSE) in hmdfs_sendmessage()
200 head->operations.command, ret); in hmdfs_sendmessage()
211 struct hmdfs_head_cmd head; in hmdfs_sendmessage_response() local
213 head.magic = HMDFS_MSG_MAGIC; in hmdfs_sendmessage_response()
214 head.version = HMDFS_VERSION; in hmdfs_sendmessage_response()
215 head.operations = cmd->operations; in hmdfs_sendmessage_response()
216 head.operations.cmd_flag = C_RESPONSE; in hmdfs_sendmessage_response()
217 head.data_len = cpu_to_le32(data_len + sizeof(struct hmdfs_head_cmd)); in hmdfs_sendmessage_response()
218 head.ret_code = cpu_to_le32(ret_code); in hmdfs_sendmessage_response()
219 head.msg_id = cmd->msg_id; in hmdfs_sendmessage_response()
220 head.reserved = cmd->reserved; in hmdfs_sendmessage_response()
221 head.reserved1 = cmd->reserved1; in hmdfs_sendmessage_response()
222 msg.head = &head; in hmdfs_sendmessage_response()
240 peer = mp->head.peer; in mp_release()
241 idr_remove(&peer->msg_idr, mp->head.msg_id); in mp_release()
251 kref_put_lock(&mp->head.ref, mp_release, &mp->head.peer->idr_lock); in mp_put()
260 hmdfs_override_creds(mp->head.peer->sbi->cred); in async_request_cb_on_wakeup_fn()
263 hmdfs_client_resp_statis(mp->head.peer->sbi, in async_request_cb_on_wakeup_fn()
269 (*cbs.on_wakeup)(mp->head.peer, &mp->req, &mp->resp); in async_request_cb_on_wakeup_fn()
284 mp->head.send_cmd_operations); in mp_alloc()
291 peer_get(mp->head.peer); in mp_alloc()
316 struct hmdfs_head_cmd head; in hmdfs_send_async_request() local
337 head.magic = HMDFS_MSG_MAGIC; in hmdfs_send_async_request()
338 head.version = HMDFS_VERSION; in hmdfs_send_async_request()
339 head.data_len = cpu_to_le32(msg_len); in hmdfs_send_async_request()
340 head.operations = mp->req.operations; in hmdfs_send_async_request()
341 head.msg_id = cpu_to_le32(mp->head.msg_id); in hmdfs_send_async_request()
342 head.reserved = 0; in hmdfs_send_async_request()
343 head.reserved1 = 0; in hmdfs_send_async_request()
345 msg.head = &head; in hmdfs_send_async_request()
346 msg.head_len = sizeof(head); in hmdfs_send_async_request()
407 struct hmdfs_head_cmd *head = NULL; in hmdfs_sendmessage_request() local
422 head = kzalloc(sizeof(struct hmdfs_head_cmd), GFP_KERNEL); in hmdfs_sendmessage_request()
423 if (!head) { in hmdfs_sendmessage_request()
429 head->magic = HMDFS_MSG_MAGIC; in hmdfs_sendmessage_request()
430 head->version = HMDFS_VERSION; in hmdfs_sendmessage_request()
431 head->operations = sm->operations; in hmdfs_sendmessage_request()
432 head->data_len = cpu_to_le32(outlen); in hmdfs_sendmessage_request()
433 head->ret_code = cpu_to_le32(sm->ret_code); in hmdfs_sendmessage_request()
434 head->reserved = 0; in hmdfs_sendmessage_request()
435 head->reserved1 = 0; in hmdfs_sendmessage_request()
449 head->msg_id = cpu_to_le32(msg_wq->head.msg_id); in hmdfs_sendmessage_request()
453 msg.head = head; in hmdfs_sendmessage_request()
462 con->device_id, head->msg_id); in hmdfs_sendmessage_request()
489 con->device_id, head->msg_id, in hmdfs_sendmessage_request()
490 head->operations.command); in hmdfs_sendmessage_request()
508 kfree(head); in hmdfs_sendmessage_request()
514 kfree(head); in hmdfs_sendmessage_request()
523 struct hmdfs_head_cmd head; in hmdfs_send_slice() local
528 head.magic = HMDFS_MSG_MAGIC; in hmdfs_send_slice()
529 head.version = HMDFS_VERSION; in hmdfs_send_slice()
530 head.operations = cmd->operations; in hmdfs_send_slice()
531 head.operations.cmd_flag = C_RESPONSE; in hmdfs_send_slice()
532 head.data_len = cpu_to_le32(msg_len); in hmdfs_send_slice()
533 head.ret_code = cpu_to_le32(0); in hmdfs_send_slice()
534 head.msg_id = cmd->msg_id; in hmdfs_send_slice()
535 head.reserved = cmd->reserved; in hmdfs_send_slice()
536 head.reserved1 = cmd->reserved1; in hmdfs_send_slice()
538 msg.head = &head; in hmdfs_send_slice()
550 int hmdfs_readfile_response(struct hmdfs_peer *con, struct hmdfs_head_cmd *head, in hmdfs_readfile_response() argument
562 return hmdfs_sendmessage_response(con, head, 0, NULL, 0); in hmdfs_readfile_response()
584 ret = hmdfs_send_slice(con, head, &sdesc, slice_buf); in hmdfs_readfile_response()
597 hmdfs_sendmessage_response(con, head, 0, NULL, ret); in hmdfs_readfile_response()
608 peer = asw->head.peer; in asw_release()
609 idr_remove(&peer->msg_idr, asw->head.msg_id); in asw_release()
616 kref_put_lock(&asw->head.ref, asw_release, &asw->head.peer->idr_lock); in asw_put()
624 hmdfs_client_resp_statis(async_work->head.peer->sbi, in hmdfs_recv_page_work_fn()
627 async_work->head.msg_id); in hmdfs_recv_page_work_fn()
638 struct hmdfs_head_cmd head; in hmdfs_sendpage_request() local
657 memset(&head, 0, sizeof(head)); in hmdfs_sendpage_request()
658 head.magic = HMDFS_MSG_MAGIC; in hmdfs_sendpage_request()
659 head.version = HMDFS_VERSION; in hmdfs_sendpage_request()
660 head.operations = sm->operations; in hmdfs_sendpage_request()
661 head.data_len = cpu_to_le32(outlen); in hmdfs_sendpage_request()
662 head.ret_code = cpu_to_le32(sm->ret_code); in hmdfs_sendpage_request()
663 head.reserved = 0; in hmdfs_sendpage_request()
664 head.reserved1 = 0; in hmdfs_sendpage_request()
666 msg.head = &head; in hmdfs_sendpage_request()
684 head.msg_id = cpu_to_le32(async_work->head.msg_id); in hmdfs_sendpage_request()
691 hmdfs_err("queue_delayed_work failed, msg_id %u", head.msg_id); in hmdfs_sendpage_request()
697 con->device_id, head.msg_id); in hmdfs_sendpage_request()
724 struct hmdfs_head_cmd *head, void *buf) in hmdfs_request_handle_sync() argument
735 s_recv_callbacks[head->operations.command](con, head, buf); in hmdfs_request_handle_sync()
736 hmdfs_statistic(con->sbi, head->operations.command, jiffies - start); in hmdfs_request_handle_sync()
744 struct hmdfs_head_cmd *head, void *buf) in hmdfs_msg_handle_sync() argument
756 hmdfs_request_handle_sync(con, head, buf); in hmdfs_msg_handle_sync()
768 hmdfs_msg_handle_sync(desp->peer, desp->head, desp->buf); in hmdfs_request_work_fn()
770 kfree(desp->head); in hmdfs_request_work_fn()
775 struct hmdfs_head_cmd *head, void *buf, in hmdfs_msg_handle_async() argument
795 *dup_head = *head; in hmdfs_msg_handle_async()
797 desp->head = dup_head; in hmdfs_msg_handle_async()
813 struct hmdfs_head_cmd *head, void *buf) in hmdfs_request_recv() argument
817 if (head->operations.command >= F_SIZE || in hmdfs_request_recv()
818 !s_recv_callbacks[head->operations.command]) { in hmdfs_request_recv()
821 head->operations.command); in hmdfs_request_recv()
825 switch (head->operations.command) { in hmdfs_request_recv()
845 ret = hmdfs_msg_handle_async(con, head, buf, con->req_handle_wq, in hmdfs_request_recv()
850 hmdfs_msg_handle_sync(con, head, buf); in hmdfs_request_recv()
855 head->operations.command); in hmdfs_request_recv()
916 u8 cmd = desp->head->operations.command; in hmdfs_file_response_work_fn()
921 le32_to_cpu(desp->head->msg_id), desp->head->operations); in hmdfs_file_response_work_fn()
926 le32_to_cpu(desp->head->msg_id)); in hmdfs_file_response_work_fn()
930 ret = le32_to_cpu(desp->head->ret_code); in hmdfs_file_response_work_fn()
931 if (ret || le32_to_cpu(desp->head->data_len) == sizeof(*desp->head)) in hmdfs_file_response_work_fn()
951 kfree(desp->head); in hmdfs_file_response_work_fn()
964 struct hmdfs_head_cmd *head, void *buf) in hmdfs_response_handle_sync() argument
969 u32 msg_id = le32_to_cpu(head->msg_id); in hmdfs_response_handle_sync()
971 u8 cmd = head->operations.command; in hmdfs_response_handle_sync()
973 msg_head = hmdfs_find_msg_head(con, msg_id, head->operations); in hmdfs_response_handle_sync()
982 le32_to_cpu(head->ret_code), in hmdfs_response_handle_sync()
983 le32_to_cpu(head->data_len), buf); in hmdfs_response_handle_sync()
999 le32_to_cpu(head->data_len) - sizeof(*head); in hmdfs_response_handle_sync()
1000 mp->resp.ret_code = le32_to_cpu(head->ret_code); in hmdfs_response_handle_sync()
1024 struct hmdfs_head_cmd *head, void *buf) in hmdfs_response_recv() argument
1026 __u16 command = head->operations.command; in hmdfs_response_recv()
1034 switch (head->operations.command) { in hmdfs_response_recv()
1054 ret = hmdfs_response_handle_sync(con, head, buf); in hmdfs_response_recv()
1058 ret = hmdfs_msg_handle_async(con, head, buf, con->async_wq, in hmdfs_response_recv()
1064 head->operations.command); in hmdfs_response_recv()
1070 void hmdfs_recv_mesg_callback(struct hmdfs_peer *con, void *head, in hmdfs_recv_mesg_callback() argument
1073 struct hmdfs_head_cmd *hmdfs_head = (struct hmdfs_head_cmd *)head; in hmdfs_recv_mesg_callback()
1109 mp->head.msg_id, mp->req.operations.command); in hmdfs_wakeup_parasite()
1118 async_work->head.msg_id); in hmdfs_wakeup_async_work()