Lines Matching +full:command +full:- +full:and +full:- +full:control
1 // SPDX-License-Identifier: MIT or LGPL-2.1-only
33 /************ stored in ublksrv_ctrl_dev_info->ublksrv_flags *******/
36 * for wakeup io command io_uring context
46 * Generic data for creating one ublk control device, which is used for
47 * sending control commands to /dev/ublk-control.
49 * Control commands(UBLK_CMD_*) are defined in ublk_cmd.h.
68 * ->handle_io_async() and ->tgt_io_done().
92 * ublksrv_queue is 1:1 mapping with ublk driver's blk-mq queue, and
93 * has same queue depth with ublk driver's blk-mq queue.
185 * with our io_uring too, if this is true, ->tgt_io_done callback
187 * ->handle_event() for processing io completion there.
195 * target io is handled by our io_uring, and once the target io
218 * then found eventfd is completed, so call ->handle_event()
220 * 3) inside ->handle_event(), if any io represented by one io
221 * command is completed, ublksrv_complete_io() is called for
224 * 4) after returning from ->handle_event(), ubq_daemon will
236 * of IOs, and the target code has to request for allocating extra ios
237 * by passing tgt_type->extra_ios and let this callback consume & handle
249 * show target specific command line for adding new device
258 * command line parameters
313 * queue_data_ptr points to address of q->priviate_data, so that
315 * queue data can be stored to q->private_data via queue_data_ptr.
317 * ->init_queue provides one chance to override/init the passed
319 * q->private_data before calling ->init_queue()
323 /** deinit queue data, counter pair of ->init_queue */
330 * Build sqe->user_data.
332 * io_uring relies on ->user_data to map cqe to the submitted io represented by
333 * sqe, encodes ublk interested info into ->user_data for handling IO
339 * @param is_taget_io is this one target io, and it should be true for target,
340 * and false for ublksrv built uring command, which is for communicating
376 * \defgroup ctrl_dev control device API
378 * Most of APIs are for sending command to ublk control device(/dev/ublk-control),
379 * and some of them are just for device management purpose, such as, retrieving
389 * Deinit one control device
391 * @param dev the ublksrv control device instance
397 * Allocate and init one control device
399 * @param data data for allocating & initializing this control device
405 * Retrieve and store each queue's cpu affinity info into private data of the
406 * control device by sending commands to ublk control device
408 * @param ctrl_dev the ublksrv control device instance
414 * Add one ublk device by sending command to ublk driver
416 * @param dev the ublksrv control device instance
421 * Delete this ublk device by sending command to ublk driver
423 * @param dev the ublksrv control device instance
428 * Delete this ublk device asynchronously by sending command to ublk driver
430 * @param dev the ublksrv control device instance
435 * Retrieve ublk device info by sending command to ublk control device
437 * @param dev the ublksrv control device instance
442 * Stop the specified ublk device by sending command to ublk control device
444 * @param dev the ublksrv control device instance
451 * @param dev the ublksrv control device instance
457 * Start this ublk device by sending command to ublk control device
459 * @param ctrl_dev the ublksrv control device instance
466 * Set specified device parameter by sending command to ublk control device
468 * @param dev the ublksrv control device instance
475 * Get specified device parameter by sending command to ublk control device
477 * @param dev the ublksrv control device instance
484 * Start to recovery device by sending command to ublk control device
486 * @param dev the ublksrv control device instance
491 * End recovery device by sending command to ublk control device
493 * Once this command is successful, the device is recovered to normal state
495 * @param dev the ublksrv control device instance
504 * @param dev the ublksrv control device instance
520 * Device pid file and json string stored under this dir
522 * @param dev the ublksrv control device instance
529 * Setup target type, run_dir and json buffer before starting to recovery device.
531 * @param dev the ublksrv control device instance
543 * Setup target type, run_dir and json buffer before starting to recovery device.
545 * @param dev the ublksrv control device instance
550 * Return true if this control device is for recovering
552 * @param dev the ublksrv control device instance
562 * ublksrv device ("/dev/ublkcN") level APIs, and ublksrv device focuses on
571 * Allocate and initialize ublksrv device
573 * @param ctrl_dev the ublksrv control device instance
579 * Deinitialize and free ublksrv device
586 * Return the associated ublksrv control device instance
646 * @param dev the ublksrv control device instance
665 * @param dev the ublksrv control device instance
807 * Inside ->init_tgt() callback, target code sets io private data
808 * size via dev->tgt.io_data_size, then io private data will be allocated
826 * tag, and private data
832 * Return pre-allocated io buffer
838 * @return pre-allocated io buffer for this io
853 * Allocate and initialize ublksrv queue instance
874 * Return -1 if uring isn't setup correctly
882 * Return the specified queue instance by ublksrv device and qid
884 * Retrieve queue instance by ublksrv device and queue id
893 * Process target IO & IO command from this queue's io_uring
895 * Handle incoming io command by calling target ->handle_io_async(), or
896 * call ->tgt_io_done() if target IO is completed.