Sheepdog creating a VDI process

Source: Internet
Author: User
Sd_create_hyper_volume--->OPCODE:SD_OP_NEW_VDI
Exec_local_req
Submit_local_request---> Add req to Sys->local_req_queue
|
|
V
Local_req_handler---> Handling local messages
Queue_request---> select processing based on OP type
Queue_cluster_request---> Call cluster Driver (zookeeper) to send messages globally
sys->cdrv->block<--->zk_block
Add_event--->type:event_block
Zk_queue_push
Zk_create_seq_node---> Add ZK event with monotonically increasing event sequence
|
|
|
V
Zk_event_handler---> Call zk_event_handlers
Zk_handle_block---> Remove the Head node request, the request is not removed from the list until unblock arrives
Sd_block_handler---> Non-processing messages are returned directly, registering operation functions Do_process_work and Cluster_op_done,
Set cluster_op_running to true to ensure that blocked requests are executed serially
Queue_work---> Add req messages to Sys->block_wqueue, wake up worker threads
|
|
|
V
-------worker_routine---> Worker thread callback function, add to finished_list after completion
| WORK-&GT;FN (Work) <---->do_process_work
| Req->op->process_work (req) <---&GT;CLUSTER_NEW_VDI
| Vdi_create---> Get available vid, create VDI
|
|------>worker_thread_request_done to handle tasks on finished_list
Work->done (Work) <---->cluster_op_done
PREPARE_CLUSTER_MSG---> Build messages that need to be sent
sys->cdrv->unblock<---->zk_unblock
Add_event---> Add event_unblock event to send a build message
|
|
|
V
Zk_event_handler---> Call zk_event_handlers
Zk_handle_unblock
Sd_notify_handler---> This node message req need put, not this node message for main processing, set Sd_notify_handler to False
Do_process_main---> Invoke the registered main function
op->process_main<----&GT;POST_CLUSTER_NEW_VDI
Atomic_set_bit (NR, sys->vdi_inuse)---> The corresponding position bit when successful

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.