• 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
421 head = kzalloc(sizeof(struct hmdfs_head_cmd), GFP_KERNEL); in hmdfs_sendmessage_request()
422 if (!head) in hmdfs_sendmessage_request()
426 head->magic = HMDFS_MSG_MAGIC; in hmdfs_sendmessage_request()
427 head->version = DFS_2_0; in hmdfs_sendmessage_request()
428 head->operations = sm->operations; in hmdfs_sendmessage_request()
429 head->data_len = cpu_to_le32(outlen); in hmdfs_sendmessage_request()
430 head->ret_code = cpu_to_le32(sm->ret_code); in hmdfs_sendmessage_request()
431 head->reserved = 0; in hmdfs_sendmessage_request()
432 head->reserved1 = 0; in hmdfs_sendmessage_request()
446 head->msg_id = cpu_to_le32(msg_wq->head.msg_id); in hmdfs_sendmessage_request()
450 msg.head = head; in hmdfs_sendmessage_request()
459 con->device_id, head->msg_id); in hmdfs_sendmessage_request()
486 con->device_id, head->msg_id, in hmdfs_sendmessage_request()
487 head->operations.command); in hmdfs_sendmessage_request()
505 kfree(head); in hmdfs_sendmessage_request()
514 struct hmdfs_head_cmd head; in hmdfs_send_slice() local
519 head.magic = HMDFS_MSG_MAGIC; in hmdfs_send_slice()
520 head.version = DFS_2_0; in hmdfs_send_slice()
521 head.operations = cmd->operations; in hmdfs_send_slice()
522 head.operations.cmd_flag = C_RESPONSE; in hmdfs_send_slice()
523 head.data_len = cpu_to_le32(msg_len); in hmdfs_send_slice()
524 head.ret_code = cpu_to_le32(0); in hmdfs_send_slice()
525 head.msg_id = cmd->msg_id; in hmdfs_send_slice()
526 head.reserved = cmd->reserved; in hmdfs_send_slice()
527 head.reserved1 = cmd->reserved1; in hmdfs_send_slice()
529 msg.head = &head; in hmdfs_send_slice()
541 int hmdfs_readfile_response(struct hmdfs_peer *con, struct hmdfs_head_cmd *head, in hmdfs_readfile_response() argument
553 return hmdfs_sendmessage_response(con, head, 0, NULL, 0); in hmdfs_readfile_response()
575 ret = hmdfs_send_slice(con, head, &sdesc, slice_buf); in hmdfs_readfile_response()
588 hmdfs_sendmessage_response(con, head, 0, NULL, ret); in hmdfs_readfile_response()
599 peer = asw->head.peer; in asw_release()
600 idr_remove(&peer->msg_idr, asw->head.msg_id); in asw_release()
607 kref_put_lock(&asw->head.ref, asw_release, &asw->head.peer->idr_lock); in asw_put()
615 if (async_work->head.peer->version >= DFS_2_0) in hmdfs_recv_page_work_fn()
616 hmdfs_client_resp_statis(async_work->head.peer->sbi, in hmdfs_recv_page_work_fn()
619 async_work->head.msg_id); in hmdfs_recv_page_work_fn()
630 struct hmdfs_head_cmd head; in hmdfs_sendpage_request() local
649 memset(&head, 0, sizeof(head)); in hmdfs_sendpage_request()
650 head.magic = HMDFS_MSG_MAGIC; in hmdfs_sendpage_request()
651 head.version = DFS_2_0; in hmdfs_sendpage_request()
652 head.operations = sm->operations; in hmdfs_sendpage_request()
653 head.data_len = cpu_to_le32(outlen); in hmdfs_sendpage_request()
654 head.ret_code = cpu_to_le32(sm->ret_code); in hmdfs_sendpage_request()
655 head.reserved = 0; in hmdfs_sendpage_request()
656 head.reserved1 = 0; in hmdfs_sendpage_request()
658 msg.head = &head; in hmdfs_sendpage_request()
676 head.msg_id = cpu_to_le32(async_work->head.msg_id); in hmdfs_sendpage_request()
683 hmdfs_err("queue_delayed_work failed, msg_id %u", head.msg_id); in hmdfs_sendpage_request()
689 con->device_id, head.msg_id); in hmdfs_sendpage_request()
716 struct hmdfs_head_cmd *head, void *buf) in hmdfs_request_handle_sync() argument
727 s_recv_callbacks[head->operations.command](con, head, buf); in hmdfs_request_handle_sync()
728 hmdfs_statistic(con->sbi, head->operations.command, jiffies - start); in hmdfs_request_handle_sync()
736 struct hmdfs_head_cmd *head, void *buf) in hmdfs_msg_handle_sync() argument
748 hmdfs_request_handle_sync(con, head, buf); in hmdfs_msg_handle_sync()
760 hmdfs_msg_handle_sync(desp->peer, desp->head, desp->buf); in hmdfs_request_work_fn()
762 kfree(desp->head); in hmdfs_request_work_fn()
767 struct hmdfs_head_cmd *head, void *buf, in hmdfs_msg_handle_async() argument
787 *dup_head = *head; in hmdfs_msg_handle_async()
789 desp->head = dup_head; in hmdfs_msg_handle_async()
805 struct hmdfs_head_cmd *head, void *buf) in hmdfs_request_recv() argument
809 if (head->operations.command >= F_SIZE || in hmdfs_request_recv()
810 !s_recv_callbacks[head->operations.command]) { in hmdfs_request_recv()
813 head->operations.command); in hmdfs_request_recv()
817 switch (head->operations.command) { in hmdfs_request_recv()
838 ret = hmdfs_msg_handle_async(con, head, buf, con->req_handle_wq, in hmdfs_request_recv()
844 hmdfs_msg_handle_sync(con, head, buf); in hmdfs_request_recv()
849 head->operations.command); in hmdfs_request_recv()
905 u8 cmd = desp->head->operations.command; in hmdfs_file_response_work_fn()
910 le32_to_cpu(desp->head->msg_id)); in hmdfs_file_response_work_fn()
915 le32_to_cpu(desp->head->msg_id)); in hmdfs_file_response_work_fn()
919 ret = le32_to_cpu(desp->head->ret_code); in hmdfs_file_response_work_fn()
920 if (ret || le32_to_cpu(desp->head->data_len) == sizeof(*desp->head)) in hmdfs_file_response_work_fn()
940 kfree(desp->head); in hmdfs_file_response_work_fn()
953 struct hmdfs_head_cmd *head, void *buf) in hmdfs_response_handle_sync() argument
958 u32 msg_id = le32_to_cpu(head->msg_id); in hmdfs_response_handle_sync()
960 u8 cmd = head->operations.command; in hmdfs_response_handle_sync()
971 le32_to_cpu(head->ret_code), in hmdfs_response_handle_sync()
972 le32_to_cpu(head->data_len), buf); in hmdfs_response_handle_sync()
988 le32_to_cpu(head->data_len) - sizeof(*head); in hmdfs_response_handle_sync()
989 mp->resp.ret_code = le32_to_cpu(head->ret_code); in hmdfs_response_handle_sync()
1013 struct hmdfs_head_cmd *head, void *buf) in hmdfs_response_recv() argument
1015 __u16 command = head->operations.command; in hmdfs_response_recv()
1023 switch (head->operations.command) { in hmdfs_response_recv()
1043 ret = hmdfs_response_handle_sync(con, head, buf); in hmdfs_response_recv()
1047 ret = hmdfs_msg_handle_async(con, head, buf, con->async_wq, in hmdfs_response_recv()
1053 head->operations.command); in hmdfs_response_recv()
1059 static void hmdfs_recv_mesg_callback(struct hmdfs_peer *con, void *head, in hmdfs_recv_mesg_callback() argument
1062 struct hmdfs_head_cmd *hmdfs_head = (struct hmdfs_head_cmd *)head; in hmdfs_recv_mesg_callback()
1094 struct hmdfs_head_cmd *head, in hmdfs_recv_page_callback() argument
1097 if (head->operations.command == F_READPAGE) in hmdfs_recv_page_callback()
1098 hmdfs_client_recv_readpage(head, err, data); in hmdfs_recv_page_callback()
1135 mp->head.msg_id, mp->req.operations.command); in hmdfs_wakeup_parasite()
1144 async_work->head.msg_id); in hmdfs_wakeup_async_work()