• 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()
127 struct hmdfs_head_cmd *head = msg->head; in hmdfs_sendmessage() local
132 head->operations.command); in hmdfs_sendmessage()
138 head->operations.command); in hmdfs_sendmessage()
150 node->device_id, head->operations.command); in hmdfs_sendmessage()
167 node->device_id, head->operations.command); in hmdfs_sendmessage()
192 statistic_con_sb_dirty(node, &head->operations); in hmdfs_sendmessage()
194 if (head->operations.cmd_flag == C_REQUEST) in hmdfs_sendmessage()
196 head->operations.command, ret); in hmdfs_sendmessage()
197 else if (head->operations.cmd_flag == C_RESPONSE) in hmdfs_sendmessage()
199 head->operations.command, ret); in hmdfs_sendmessage()
210 struct hmdfs_head_cmd head; in hmdfs_sendmessage_response() local
212 head.magic = HMDFS_MSG_MAGIC; in hmdfs_sendmessage_response()
213 head.version = HMDFS_VERSION; in hmdfs_sendmessage_response()
214 head.operations = cmd->operations; in hmdfs_sendmessage_response()
215 head.operations.cmd_flag = C_RESPONSE; in hmdfs_sendmessage_response()
216 head.data_len = cpu_to_le32(data_len + sizeof(struct hmdfs_head_cmd)); in hmdfs_sendmessage_response()
217 head.ret_code = cpu_to_le32(ret_code); in hmdfs_sendmessage_response()
218 head.msg_id = cmd->msg_id; in hmdfs_sendmessage_response()
219 head.reserved = cmd->reserved; in hmdfs_sendmessage_response()
220 head.reserved1 = cmd->reserved1; in hmdfs_sendmessage_response()
221 msg.head = &head; in hmdfs_sendmessage_response()
239 peer = mp->head.peer; in mp_release()
240 idr_remove(&peer->msg_idr, mp->head.msg_id); in mp_release()
250 kref_put_lock(&mp->head.ref, mp_release, &mp->head.peer->idr_lock); in mp_put()
259 hmdfs_override_creds(mp->head.peer->sbi->cred); in async_request_cb_on_wakeup_fn()
262 hmdfs_client_resp_statis(mp->head.peer->sbi, in async_request_cb_on_wakeup_fn()
268 (*cbs.on_wakeup)(mp->head.peer, &mp->req, &mp->resp); in async_request_cb_on_wakeup_fn()
289 peer_get(mp->head.peer); in mp_alloc()
314 struct hmdfs_head_cmd head; in hmdfs_send_async_request() local
335 head.magic = HMDFS_MSG_MAGIC; in hmdfs_send_async_request()
336 head.version = HMDFS_VERSION; in hmdfs_send_async_request()
337 head.data_len = cpu_to_le32(msg_len); in hmdfs_send_async_request()
338 head.operations = mp->req.operations; in hmdfs_send_async_request()
339 head.msg_id = cpu_to_le32(mp->head.msg_id); in hmdfs_send_async_request()
340 head.reserved = 0; in hmdfs_send_async_request()
341 head.reserved1 = 0; in hmdfs_send_async_request()
343 msg.head = &head; in hmdfs_send_async_request()
344 msg.head_len = sizeof(head); in hmdfs_send_async_request()
405 struct hmdfs_head_cmd *head = NULL; in hmdfs_sendmessage_request() local
420 head = kzalloc(sizeof(struct hmdfs_head_cmd), GFP_KERNEL); in hmdfs_sendmessage_request()
421 if (!head) { in hmdfs_sendmessage_request()
427 head->magic = HMDFS_MSG_MAGIC; in hmdfs_sendmessage_request()
428 head->version = HMDFS_VERSION; in hmdfs_sendmessage_request()
429 head->operations = sm->operations; in hmdfs_sendmessage_request()
430 head->data_len = cpu_to_le32(outlen); in hmdfs_sendmessage_request()
431 head->ret_code = cpu_to_le32(sm->ret_code); in hmdfs_sendmessage_request()
432 head->reserved = 0; in hmdfs_sendmessage_request()
433 head->reserved1 = 0; in hmdfs_sendmessage_request()
447 head->msg_id = cpu_to_le32(msg_wq->head.msg_id); in hmdfs_sendmessage_request()
451 msg.head = head; in hmdfs_sendmessage_request()
460 con->device_id, head->msg_id); in hmdfs_sendmessage_request()
487 con->device_id, head->msg_id, in hmdfs_sendmessage_request()
488 head->operations.command); in hmdfs_sendmessage_request()
506 kfree(head); in hmdfs_sendmessage_request()
512 kfree(head); in hmdfs_sendmessage_request()
521 struct hmdfs_head_cmd head; in hmdfs_send_slice() local
526 head.magic = HMDFS_MSG_MAGIC; in hmdfs_send_slice()
527 head.version = HMDFS_VERSION; in hmdfs_send_slice()
528 head.operations = cmd->operations; in hmdfs_send_slice()
529 head.operations.cmd_flag = C_RESPONSE; in hmdfs_send_slice()
530 head.data_len = cpu_to_le32(msg_len); in hmdfs_send_slice()
531 head.ret_code = cpu_to_le32(0); in hmdfs_send_slice()
532 head.msg_id = cmd->msg_id; in hmdfs_send_slice()
533 head.reserved = cmd->reserved; in hmdfs_send_slice()
534 head.reserved1 = cmd->reserved1; in hmdfs_send_slice()
536 msg.head = &head; in hmdfs_send_slice()
548 int hmdfs_readfile_response(struct hmdfs_peer *con, struct hmdfs_head_cmd *head, in hmdfs_readfile_response() argument
560 return hmdfs_sendmessage_response(con, head, 0, NULL, 0); in hmdfs_readfile_response()
582 ret = hmdfs_send_slice(con, head, &sdesc, slice_buf); in hmdfs_readfile_response()
595 hmdfs_sendmessage_response(con, head, 0, NULL, ret); in hmdfs_readfile_response()
606 peer = asw->head.peer; in asw_release()
607 idr_remove(&peer->msg_idr, asw->head.msg_id); in asw_release()
614 kref_put_lock(&asw->head.ref, asw_release, &asw->head.peer->idr_lock); in asw_put()
622 hmdfs_client_resp_statis(async_work->head.peer->sbi, in hmdfs_recv_page_work_fn()
625 async_work->head.msg_id); in hmdfs_recv_page_work_fn()
636 struct hmdfs_head_cmd head; in hmdfs_sendpage_request() local
655 memset(&head, 0, sizeof(head)); in hmdfs_sendpage_request()
656 head.magic = HMDFS_MSG_MAGIC; in hmdfs_sendpage_request()
657 head.version = HMDFS_VERSION; in hmdfs_sendpage_request()
658 head.operations = sm->operations; in hmdfs_sendpage_request()
659 head.data_len = cpu_to_le32(outlen); in hmdfs_sendpage_request()
660 head.ret_code = cpu_to_le32(sm->ret_code); in hmdfs_sendpage_request()
661 head.reserved = 0; in hmdfs_sendpage_request()
662 head.reserved1 = 0; in hmdfs_sendpage_request()
664 msg.head = &head; in hmdfs_sendpage_request()
682 head.msg_id = cpu_to_le32(async_work->head.msg_id); in hmdfs_sendpage_request()
689 hmdfs_err("queue_delayed_work failed, msg_id %u", head.msg_id); in hmdfs_sendpage_request()
695 con->device_id, head.msg_id); in hmdfs_sendpage_request()
722 struct hmdfs_head_cmd *head, void *buf) in hmdfs_request_handle_sync() argument
733 s_recv_callbacks[head->operations.command](con, head, buf); in hmdfs_request_handle_sync()
734 hmdfs_statistic(con->sbi, head->operations.command, jiffies - start); in hmdfs_request_handle_sync()
742 struct hmdfs_head_cmd *head, void *buf) in hmdfs_msg_handle_sync() argument
754 hmdfs_request_handle_sync(con, head, buf); in hmdfs_msg_handle_sync()
766 hmdfs_msg_handle_sync(desp->peer, desp->head, desp->buf); in hmdfs_request_work_fn()
768 kfree(desp->head); in hmdfs_request_work_fn()
773 struct hmdfs_head_cmd *head, void *buf, in hmdfs_msg_handle_async() argument
793 *dup_head = *head; in hmdfs_msg_handle_async()
795 desp->head = dup_head; in hmdfs_msg_handle_async()
811 struct hmdfs_head_cmd *head, void *buf) in hmdfs_request_recv() argument
815 if (head->operations.command >= F_SIZE || in hmdfs_request_recv()
816 !s_recv_callbacks[head->operations.command]) { in hmdfs_request_recv()
819 head->operations.command); in hmdfs_request_recv()
823 switch (head->operations.command) { in hmdfs_request_recv()
843 ret = hmdfs_msg_handle_async(con, head, buf, con->req_handle_wq, in hmdfs_request_recv()
848 hmdfs_msg_handle_sync(con, head, buf); in hmdfs_request_recv()
853 head->operations.command); in hmdfs_request_recv()
909 u8 cmd = desp->head->operations.command; in hmdfs_file_response_work_fn()
914 le32_to_cpu(desp->head->msg_id)); in hmdfs_file_response_work_fn()
919 le32_to_cpu(desp->head->msg_id)); in hmdfs_file_response_work_fn()
923 ret = le32_to_cpu(desp->head->ret_code); in hmdfs_file_response_work_fn()
924 if (ret || le32_to_cpu(desp->head->data_len) == sizeof(*desp->head)) in hmdfs_file_response_work_fn()
944 kfree(desp->head); in hmdfs_file_response_work_fn()
957 struct hmdfs_head_cmd *head, void *buf) in hmdfs_response_handle_sync() argument
962 u32 msg_id = le32_to_cpu(head->msg_id); in hmdfs_response_handle_sync()
964 u8 cmd = head->operations.command; in hmdfs_response_handle_sync()
975 le32_to_cpu(head->ret_code), in hmdfs_response_handle_sync()
976 le32_to_cpu(head->data_len), buf); in hmdfs_response_handle_sync()
992 le32_to_cpu(head->data_len) - sizeof(*head); in hmdfs_response_handle_sync()
993 mp->resp.ret_code = le32_to_cpu(head->ret_code); in hmdfs_response_handle_sync()
1017 struct hmdfs_head_cmd *head, void *buf) in hmdfs_response_recv() argument
1019 __u16 command = head->operations.command; in hmdfs_response_recv()
1027 switch (head->operations.command) { in hmdfs_response_recv()
1047 ret = hmdfs_response_handle_sync(con, head, buf); in hmdfs_response_recv()
1051 ret = hmdfs_msg_handle_async(con, head, buf, con->async_wq, in hmdfs_response_recv()
1057 head->operations.command); in hmdfs_response_recv()
1063 void hmdfs_recv_mesg_callback(struct hmdfs_peer *con, void *head, in hmdfs_recv_mesg_callback() argument
1066 struct hmdfs_head_cmd *hmdfs_head = (struct hmdfs_head_cmd *)head; in hmdfs_recv_mesg_callback()
1102 mp->head.msg_id, mp->req.operations.command); in hmdfs_wakeup_parasite()
1111 async_work->head.msg_id); in hmdfs_wakeup_async_work()