• Home
  • Raw
  • Download

Lines Matching full:head

77 	con = msg_wq->head.peer;  in msg_release()
78 idr_remove(&con->msg_idr, msg_wq->head.msg_id); in msg_release()
90 kref_put_lock(&msg_wq->head.ref, msg_release, in msg_put()
91 &msg_wq->head.peer->idr_lock); in msg_put()
129 struct hmdfs_head_cmd *head = msg->head; in hmdfs_sendmessage() local
134 head->operations.command); in hmdfs_sendmessage()
140 head->operations.command); in hmdfs_sendmessage()
152 node->device_id, head->operations.command); in hmdfs_sendmessage()
169 node->device_id, head->operations.command); in hmdfs_sendmessage()
194 statistic_con_sb_dirty(node, &head->operations); in hmdfs_sendmessage()
197 head->operations.cmd_flag == C_REQUEST) in hmdfs_sendmessage()
199 head->operations.command, ret); in hmdfs_sendmessage()
201 head->operations.cmd_flag == C_RESPONSE) in hmdfs_sendmessage()
203 head->operations.command, ret); in hmdfs_sendmessage()
214 struct hmdfs_head_cmd head; in hmdfs_sendmessage_response() local
216 head.magic = HMDFS_MSG_MAGIC; in hmdfs_sendmessage_response()
217 head.version = DFS_2_0; in hmdfs_sendmessage_response()
218 head.operations = cmd->operations; in hmdfs_sendmessage_response()
219 head.operations.cmd_flag = C_RESPONSE; in hmdfs_sendmessage_response()
220 head.data_len = cpu_to_le32(data_len + sizeof(struct hmdfs_head_cmd)); in hmdfs_sendmessage_response()
221 head.ret_code = cpu_to_le32(ret_code); in hmdfs_sendmessage_response()
222 head.msg_id = cmd->msg_id; in hmdfs_sendmessage_response()
223 head.reserved = cmd->reserved; in hmdfs_sendmessage_response()
224 head.reserved1 = cmd->reserved1; in hmdfs_sendmessage_response()
225 msg.head = &head; in hmdfs_sendmessage_response()
243 peer = mp->head.peer; in mp_release()
244 idr_remove(&peer->msg_idr, mp->head.msg_id); in mp_release()
254 kref_put_lock(&mp->head.ref, mp_release, &mp->head.peer->idr_lock); in mp_put()
263 hmdfs_override_creds(mp->head.peer->sbi->cred); in async_request_cb_on_wakeup_fn()
266 hmdfs_client_resp_statis(mp->head.peer->sbi, in async_request_cb_on_wakeup_fn()
272 (*cbs.on_wakeup)(mp->head.peer, &mp->req, &mp->resp); in async_request_cb_on_wakeup_fn()
293 peer_get(mp->head.peer); in mp_alloc()
318 struct hmdfs_head_cmd head; in hmdfs_send_async_request() local
339 head.magic = HMDFS_MSG_MAGIC; in hmdfs_send_async_request()
340 head.version = DFS_2_0; in hmdfs_send_async_request()
341 head.data_len = cpu_to_le32(msg_len); in hmdfs_send_async_request()
342 head.operations = mp->req.operations; in hmdfs_send_async_request()
343 head.msg_id = cpu_to_le32(mp->head.msg_id); in hmdfs_send_async_request()
344 head.reserved = 0; in hmdfs_send_async_request()
345 head.reserved1 = 0; in hmdfs_send_async_request()
347 msg.head = &head; in hmdfs_send_async_request()
348 msg.head_len = sizeof(head); in hmdfs_send_async_request()
409 struct hmdfs_head_cmd *head = NULL; in hmdfs_sendmessage_request() local
424 head = kzalloc(sizeof(struct hmdfs_head_cmd), GFP_KERNEL); in hmdfs_sendmessage_request()
425 if (!head) { in hmdfs_sendmessage_request()
431 head->magic = HMDFS_MSG_MAGIC; in hmdfs_sendmessage_request()
432 head->version = DFS_2_0; in hmdfs_sendmessage_request()
433 head->operations = sm->operations; in hmdfs_sendmessage_request()
434 head->data_len = cpu_to_le32(outlen); in hmdfs_sendmessage_request()
435 head->ret_code = cpu_to_le32(sm->ret_code); in hmdfs_sendmessage_request()
436 head->reserved = 0; in hmdfs_sendmessage_request()
437 head->reserved1 = 0; in hmdfs_sendmessage_request()
451 head->msg_id = cpu_to_le32(msg_wq->head.msg_id); in hmdfs_sendmessage_request()
455 msg.head = head; in hmdfs_sendmessage_request()
464 con->device_id, head->msg_id); in hmdfs_sendmessage_request()
491 con->device_id, head->msg_id, in hmdfs_sendmessage_request()
492 head->operations.command); in hmdfs_sendmessage_request()
510 kfree(head); in hmdfs_sendmessage_request()
516 kfree(head); in hmdfs_sendmessage_request()
525 struct hmdfs_head_cmd head; in hmdfs_send_slice() local
530 head.magic = HMDFS_MSG_MAGIC; in hmdfs_send_slice()
531 head.version = DFS_2_0; in hmdfs_send_slice()
532 head.operations = cmd->operations; in hmdfs_send_slice()
533 head.operations.cmd_flag = C_RESPONSE; in hmdfs_send_slice()
534 head.data_len = cpu_to_le32(msg_len); in hmdfs_send_slice()
535 head.ret_code = cpu_to_le32(0); in hmdfs_send_slice()
536 head.msg_id = cmd->msg_id; in hmdfs_send_slice()
537 head.reserved = cmd->reserved; in hmdfs_send_slice()
538 head.reserved1 = cmd->reserved1; in hmdfs_send_slice()
540 msg.head = &head; in hmdfs_send_slice()
552 int hmdfs_readfile_response(struct hmdfs_peer *con, struct hmdfs_head_cmd *head, in hmdfs_readfile_response() argument
564 return hmdfs_sendmessage_response(con, head, 0, NULL, 0); in hmdfs_readfile_response()
586 ret = hmdfs_send_slice(con, head, &sdesc, slice_buf); in hmdfs_readfile_response()
599 hmdfs_sendmessage_response(con, head, 0, NULL, ret); in hmdfs_readfile_response()
610 peer = asw->head.peer; in asw_release()
611 idr_remove(&peer->msg_idr, asw->head.msg_id); in asw_release()
618 kref_put_lock(&asw->head.ref, asw_release, &asw->head.peer->idr_lock); in asw_put()
626 if (async_work->head.peer->version >= DFS_2_0) in hmdfs_recv_page_work_fn()
627 hmdfs_client_resp_statis(async_work->head.peer->sbi, in hmdfs_recv_page_work_fn()
630 async_work->head.msg_id); in hmdfs_recv_page_work_fn()
641 struct hmdfs_head_cmd head; in hmdfs_sendpage_request() local
660 memset(&head, 0, sizeof(head)); in hmdfs_sendpage_request()
661 head.magic = HMDFS_MSG_MAGIC; in hmdfs_sendpage_request()
662 head.version = DFS_2_0; in hmdfs_sendpage_request()
663 head.operations = sm->operations; in hmdfs_sendpage_request()
664 head.data_len = cpu_to_le32(outlen); in hmdfs_sendpage_request()
665 head.ret_code = cpu_to_le32(sm->ret_code); in hmdfs_sendpage_request()
666 head.reserved = 0; in hmdfs_sendpage_request()
667 head.reserved1 = 0; in hmdfs_sendpage_request()
669 msg.head = &head; in hmdfs_sendpage_request()
687 head.msg_id = cpu_to_le32(async_work->head.msg_id); in hmdfs_sendpage_request()
694 hmdfs_err("queue_delayed_work failed, msg_id %u", head.msg_id); in hmdfs_sendpage_request()
700 con->device_id, head.msg_id); in hmdfs_sendpage_request()
727 struct hmdfs_head_cmd *head, void *buf) in hmdfs_request_handle_sync() argument
738 s_recv_callbacks[head->operations.command](con, head, buf); in hmdfs_request_handle_sync()
739 hmdfs_statistic(con->sbi, head->operations.command, jiffies - start); in hmdfs_request_handle_sync()
747 struct hmdfs_head_cmd *head, void *buf) in hmdfs_msg_handle_sync() argument
759 hmdfs_request_handle_sync(con, head, buf); in hmdfs_msg_handle_sync()
771 hmdfs_msg_handle_sync(desp->peer, desp->head, desp->buf); in hmdfs_request_work_fn()
773 kfree(desp->head); in hmdfs_request_work_fn()
778 struct hmdfs_head_cmd *head, void *buf, in hmdfs_msg_handle_async() argument
798 *dup_head = *head; in hmdfs_msg_handle_async()
800 desp->head = dup_head; in hmdfs_msg_handle_async()
816 struct hmdfs_head_cmd *head, void *buf) in hmdfs_request_recv() argument
820 if (head->operations.command >= F_SIZE || in hmdfs_request_recv()
821 !s_recv_callbacks[head->operations.command]) { in hmdfs_request_recv()
824 head->operations.command); in hmdfs_request_recv()
828 switch (head->operations.command) { in hmdfs_request_recv()
849 ret = hmdfs_msg_handle_async(con, head, buf, con->req_handle_wq, in hmdfs_request_recv()
855 hmdfs_msg_handle_sync(con, head, buf); in hmdfs_request_recv()
860 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)); 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()
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 static 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()
1105 struct hmdfs_head_cmd *head, in hmdfs_recv_page_callback() argument
1108 if (head->operations.command == F_READPAGE) in hmdfs_recv_page_callback()
1109 hmdfs_client_recv_readpage(head, err, data); in hmdfs_recv_page_callback()
1146 mp->head.msg_id, mp->req.operations.command); in hmdfs_wakeup_parasite()
1155 async_work->head.msg_id); in hmdfs_wakeup_async_work()