Lines Matching refs:BlockBackend

43 struct BlockBackend {  struct
49 QTAILQ_ENTRY(BlockBackend) link; /* for block_backends */ argument
50 QTAILQ_ENTRY(BlockBackend) monitor_link; /* for monitor_block_backends */
99 BlockBackend *blk; argument
108 static BlockBackend *bdrv_first_blk(BlockDriverState *bs);
111 static QTAILQ_HEAD(, BlockBackend) block_backends =
118 static QTAILQ_HEAD(, BlockBackend) monitor_block_backends =
122 blk_set_perm_locked(BlockBackend *blk, uint64_t perm, uint64_t shared_perm,
145 BlockBackend *blk = child->opaque; in blk_root_get_parent_desc()
169 BlockBackend *blk = opaque; in blk_vm_state_changed()
192 BlockBackend *blk = child->opaque; in blk_root_activate()
238 void blk_set_force_allow_inactivate(BlockBackend *blk) in blk_set_force_allow_inactivate()
244 static bool blk_can_inactivate(BlockBackend *blk) in blk_can_inactivate()
265 BlockBackend *blk = child->opaque; in blk_root_inactivate()
285 BlockBackend *blk = child->opaque; in blk_root_attach()
300 BlockBackend *blk = child->opaque; in blk_root_detach()
315 BlockBackend *blk = c->opaque; in blk_root_get_parent_aio_context()
355 BlockBackend *blk_new(AioContext *ctx, uint64_t perm, uint64_t shared_perm) in blk_new()
357 BlockBackend *blk; in blk_new()
361 blk = g_new0(BlockBackend, 1); in blk_new()
394 BlockBackend *blk_new_with_bs(BlockDriverState *bs, uint64_t perm, in blk_new_with_bs()
397 BlockBackend *blk = blk_new(bdrv_get_aio_context(bs), perm, shared_perm); in blk_new_with_bs()
423 BlockBackend *blk_new_open(const char *filename, const char *reference, in blk_new_open()
426 BlockBackend *blk; in blk_new_open()
478 static void blk_delete(BlockBackend *blk) in blk_delete()
513 int blk_get_refcnt(BlockBackend *blk) in blk_get_refcnt()
523 void blk_ref(BlockBackend *blk) in blk_ref()
535 void blk_unref(BlockBackend *blk) in blk_unref()
556 BlockBackend *blk_all_next(BlockBackend *blk) in blk_all_next()
565 BlockBackend *blk = NULL; in blk_remove_all_bs()
586 BlockBackend *blk_next(BlockBackend *blk) in blk_next()
608 BlockBackend *old_blk = it->blk; in bdrv_next()
685 bool monitor_add_blk(BlockBackend *blk, const char *name, Error **errp) in monitor_add_blk()
715 void monitor_remove_blk(BlockBackend *blk) in monitor_remove_blk()
732 const char *blk_name(const BlockBackend *blk) in blk_name()
742 BlockBackend *blk_by_name(const char *name) in blk_by_name()
744 BlockBackend *blk = NULL; in blk_by_name()
759 BlockDriverState *blk_bs(BlockBackend *blk) in blk_bs()
765 static BlockBackend * GRAPH_RDLOCK bdrv_first_blk(BlockDriverState *bs) in bdrv_first_blk()
812 DriveInfo *blk_legacy_dinfo(BlockBackend *blk) in blk_legacy_dinfo()
823 DriveInfo *blk_set_legacy_dinfo(BlockBackend *blk, DriveInfo *dinfo) in blk_set_legacy_dinfo()
834 BlockBackend *blk_by_legacy_dinfo(DriveInfo *dinfo) in blk_by_legacy_dinfo()
836 BlockBackend *blk = NULL; in blk_by_legacy_dinfo()
850 BlockBackendPublic *blk_get_public(BlockBackend *blk) in blk_get_public()
859 BlockBackend *blk_by_public(BlockBackendPublic *public) in blk_by_public()
862 return container_of(public, BlockBackend, public); in blk_by_public()
868 void blk_remove_bs(BlockBackend *blk) in blk_remove_bs()
909 int blk_insert_bs(BlockBackend *blk, BlockDriverState *bs, Error **errp) in blk_insert_bs()
937 int blk_replace_bs(BlockBackend *blk, BlockDriverState *new_bs, Error **errp) in blk_replace_bs()
947 blk_set_perm_locked(BlockBackend *blk, uint64_t perm, uint64_t shared_perm, in blk_set_perm_locked()
966 int blk_set_perm(BlockBackend *blk, uint64_t perm, uint64_t shared_perm, in blk_set_perm()
975 void blk_get_perm(BlockBackend *blk, uint64_t *perm, uint64_t *shared_perm) in blk_get_perm()
986 int blk_attach_dev(BlockBackend *blk, DeviceState *dev) in blk_attach_dev()
1011 void blk_detach_dev(BlockBackend *blk, DeviceState *dev) in blk_detach_dev()
1025 DeviceState *blk_get_attached_dev(BlockBackend *blk) in blk_get_attached_dev()
1033 char *blk_get_attached_dev_id(BlockBackend *blk) in blk_get_attached_dev_id()
1053 BlockBackend *blk_by_dev(void *dev) in blk_by_dev()
1055 BlockBackend *blk = NULL; in blk_by_dev()
1073 void blk_set_dev_ops(BlockBackend *blk, const BlockDevOps *ops, in blk_set_dev_ops()
1096 void blk_dev_change_media_cb(BlockBackend *blk, bool load, Error **errp) in blk_dev_change_media_cb()
1129 bool blk_dev_has_removable_media(BlockBackend *blk) in blk_dev_has_removable_media()
1138 bool blk_dev_has_tray(BlockBackend *blk) in blk_dev_has_tray()
1148 void blk_dev_eject_request(BlockBackend *blk, bool force) in blk_dev_eject_request()
1159 bool blk_dev_is_tray_open(BlockBackend *blk) in blk_dev_is_tray_open()
1172 bool blk_dev_is_medium_locked(BlockBackend *blk) in blk_dev_is_medium_locked()
1186 BlockBackend *blk = child->opaque; in blk_root_resize()
1193 void blk_iostatus_enable(BlockBackend *blk) in blk_iostatus_enable()
1202 bool blk_iostatus_is_enabled(const BlockBackend *blk) in blk_iostatus_is_enabled()
1211 BlockDeviceIoStatus blk_iostatus(const BlockBackend *blk) in blk_iostatus()
1217 void blk_iostatus_disable(BlockBackend *blk) in blk_iostatus_disable()
1223 void blk_iostatus_reset(BlockBackend *blk) in blk_iostatus_reset()
1231 void blk_iostatus_set_err(BlockBackend *blk, int error) in blk_iostatus_set_err()
1241 void blk_set_allow_write_beyond_eof(BlockBackend *blk, bool allow) in blk_set_allow_write_beyond_eof()
1247 void blk_set_allow_aio_context_change(BlockBackend *blk, bool allow) in blk_set_allow_aio_context_change()
1253 void blk_set_disable_request_queuing(BlockBackend *blk, bool disable) in blk_set_disable_request_queuing()
1260 blk_check_byte_request(BlockBackend *blk, int64_t offset, int64_t bytes) in blk_check_byte_request()
1291 bool blk_in_drain(BlockBackend *blk) in blk_in_drain()
1298 static void coroutine_fn blk_wait_while_drained(BlockBackend *blk) in blk_wait_while_drained()
1319 blk_co_do_preadv_part(BlockBackend *blk, int64_t offset, int64_t bytes, in blk_co_do_preadv_part()
1353 int coroutine_fn blk_co_pread(BlockBackend *blk, int64_t offset, int64_t bytes, in blk_co_pread()
1364 int coroutine_fn blk_co_preadv(BlockBackend *blk, int64_t offset, in blk_co_preadv()
1378 int coroutine_fn blk_co_preadv_part(BlockBackend *blk, int64_t offset, in blk_co_preadv_part()
1394 blk_co_do_pwritev_part(BlockBackend *blk, int64_t offset, int64_t bytes, in blk_co_do_pwritev_part()
1431 int coroutine_fn blk_co_pwritev_part(BlockBackend *blk, int64_t offset, in blk_co_pwritev_part()
1446 int coroutine_fn blk_co_pwrite(BlockBackend *blk, int64_t offset, int64_t bytes, in blk_co_pwrite()
1457 int coroutine_fn blk_co_pwritev(BlockBackend *blk, int64_t offset, in blk_co_pwritev()
1465 int coroutine_fn blk_co_block_status_above(BlockBackend *blk, in blk_co_block_status_above()
1477 int coroutine_fn blk_co_is_allocated_above(BlockBackend *blk, in blk_co_is_allocated_above()
1489 BlockBackend *blk;
1496 int blk_make_zero(BlockBackend *blk, BdrvRequestFlags flags) in blk_make_zero()
1502 void blk_inc_in_flight(BlockBackend *blk) in blk_inc_in_flight()
1508 void blk_dec_in_flight(BlockBackend *blk) in blk_dec_in_flight()
1524 BlockAIOCB *blk_abort_aio_request(BlockBackend *blk, in blk_abort_aio_request()
1568 static BlockAIOCB *blk_aio_prwv(BlockBackend *blk, int64_t offset, in blk_aio_prwv()
1625 BlockAIOCB *blk_aio_pwrite_zeroes(BlockBackend *blk, int64_t offset, in blk_aio_pwrite_zeroes()
1634 int64_t coroutine_fn blk_co_getlength(BlockBackend *blk) in blk_co_getlength()
1646 int64_t coroutine_fn blk_co_nb_sectors(BlockBackend *blk) in blk_co_nb_sectors()
1664 int64_t coroutine_mixed_fn blk_nb_sectors(BlockBackend *blk) in blk_nb_sectors()
1678 void coroutine_fn blk_co_get_geometry(BlockBackend *blk, in blk_co_get_geometry()
1688 void coroutine_mixed_fn blk_get_geometry(BlockBackend *blk, in blk_get_geometry()
1695 BlockAIOCB *blk_aio_preadv(BlockBackend *blk, int64_t offset, in blk_aio_preadv()
1705 BlockAIOCB *blk_aio_pwritev(BlockBackend *blk, int64_t offset, in blk_aio_pwritev()
1729 blk_co_do_ioctl(BlockBackend *blk, unsigned long int req, void *buf) in blk_co_do_ioctl()
1743 int coroutine_fn blk_co_ioctl(BlockBackend *blk, unsigned long int req, in blk_co_ioctl()
1766 BlockAIOCB *blk_aio_ioctl(BlockBackend *blk, unsigned long int req, void *buf, in blk_aio_ioctl()
1775 blk_co_do_pdiscard(BlockBackend *blk, int64_t offset, int64_t bytes) in blk_co_do_pdiscard()
1800 BlockAIOCB *blk_aio_pdiscard(BlockBackend *blk, in blk_aio_pdiscard()
1809 int coroutine_fn blk_co_pdiscard(BlockBackend *blk, int64_t offset, in blk_co_pdiscard()
1823 static int coroutine_fn blk_co_do_flush(BlockBackend *blk) in blk_co_do_flush()
1845 BlockAIOCB *blk_aio_flush(BlockBackend *blk, in blk_aio_flush()
1852 int coroutine_fn blk_co_flush(BlockBackend *blk) in blk_co_flush()
1875 BlockAIOCB *blk_aio_zone_report(BlockBackend *blk, int64_t offset, in blk_aio_zone_report()
1918 BlockAIOCB *blk_aio_zone_mgmt(BlockBackend *blk, BlockZoneOp op, in blk_aio_zone_mgmt()
1958 BlockAIOCB *blk_aio_zone_append(BlockBackend *blk, int64_t *offset, in blk_aio_zone_append()
1993 int coroutine_fn blk_co_zone_report(BlockBackend *blk, int64_t offset, in blk_co_zone_report()
2019 int coroutine_fn blk_co_zone_mgmt(BlockBackend *blk, BlockZoneOp op, in blk_co_zone_mgmt()
2043 int coroutine_fn blk_co_zone_append(BlockBackend *blk, int64_t *offset, in blk_co_zone_append()
2062 void blk_drain(BlockBackend *blk) in blk_drain()
2084 BlockBackend *blk = NULL; in blk_drain_all()
2098 void blk_set_on_error(BlockBackend *blk, BlockdevOnError on_read_error, in blk_set_on_error()
2106 BlockdevOnError blk_get_on_error(BlockBackend *blk, bool is_read) in blk_get_on_error()
2112 BlockErrorAction blk_get_error_action(BlockBackend *blk, bool is_read, in blk_get_error_action()
2134 static void send_qmp_error_event(BlockBackend *blk, in send_qmp_error_event()
2152 void blk_error_action(BlockBackend *blk, BlockErrorAction action, in blk_error_action()
2185 bool blk_supports_write_perm(BlockBackend *blk) in blk_supports_write_perm()
2201 bool blk_is_writable(BlockBackend *blk) in blk_is_writable()
2207 bool blk_is_sg(BlockBackend *blk) in blk_is_sg()
2219 bool blk_enable_write_cache(BlockBackend *blk) in blk_enable_write_cache()
2225 void blk_set_enable_write_cache(BlockBackend *blk, bool wce) in blk_set_enable_write_cache()
2231 void blk_activate(BlockBackend *blk, Error **errp) in blk_activate()
2253 bool coroutine_fn blk_co_is_inserted(BlockBackend *blk) in blk_co_is_inserted()
2262 bool coroutine_fn blk_co_is_available(BlockBackend *blk) in blk_co_is_available()
2268 void coroutine_fn blk_co_lock_medium(BlockBackend *blk, bool locked) in blk_co_lock_medium()
2279 void coroutine_fn blk_co_eject(BlockBackend *blk, bool eject_flag) in blk_co_eject()
2298 int blk_get_flags(BlockBackend *blk) in blk_get_flags()
2311 uint32_t blk_get_request_alignment(BlockBackend *blk) in blk_get_request_alignment()
2319 uint64_t blk_get_max_hw_transfer(BlockBackend *blk) in blk_get_max_hw_transfer()
2333 uint32_t blk_get_max_transfer(BlockBackend *blk) in blk_get_max_transfer()
2345 int blk_get_max_hw_iov(BlockBackend *blk) in blk_get_max_hw_iov()
2352 int blk_get_max_iov(BlockBackend *blk) in blk_get_max_iov()
2358 void *blk_try_blockalign(BlockBackend *blk, size_t size) in blk_try_blockalign()
2364 void *blk_blockalign(BlockBackend *blk, size_t size) in blk_blockalign()
2370 bool blk_op_is_blocked(BlockBackend *blk, BlockOpType op, Error **errp) in blk_op_is_blocked()
2383 void blk_op_unblock(BlockBackend *blk, BlockOpType op, Error *reason) in blk_op_unblock()
2393 void blk_op_block_all(BlockBackend *blk, Error *reason) in blk_op_block_all()
2403 void blk_op_unblock_all(BlockBackend *blk, Error *reason) in blk_op_unblock_all()
2420 AioContext *blk_get_aio_context(BlockBackend *blk) in blk_get_aio_context()
2431 int blk_set_aio_context(BlockBackend *blk, AioContext *new_context, in blk_set_aio_context()
2460 BlockBackend *blk;
2466 BlockBackend *blk = s->blk; in blk_root_set_aio_ctx_commit()
2486 BlockBackend *blk = child->opaque; in blk_root_change_aio_ctx()
2512 void blk_add_aio_context_notifier(BlockBackend *blk, in blk_add_aio_context_notifier()
2532 void blk_remove_aio_context_notifier(BlockBackend *blk, in blk_remove_aio_context_notifier()
2561 void blk_add_remove_bs_notifier(BlockBackend *blk, Notifier *notify) in blk_add_remove_bs_notifier()
2567 void blk_add_insert_bs_notifier(BlockBackend *blk, Notifier *notify) in blk_add_insert_bs_notifier()
2573 BlockAcctStats *blk_get_stats(BlockBackend *blk) in blk_get_stats()
2579 void *blk_aio_get(const AIOCBInfo *aiocb_info, BlockBackend *blk, in blk_aio_get()
2586 int coroutine_fn blk_co_pwrite_zeroes(BlockBackend *blk, int64_t offset, in blk_co_pwrite_zeroes()
2594 int coroutine_fn blk_co_pwrite_compressed(BlockBackend *blk, int64_t offset, in blk_co_pwrite_compressed()
2603 int coroutine_fn blk_co_truncate(BlockBackend *blk, int64_t offset, bool exact, in blk_co_truncate()
2617 int blk_save_vmstate(BlockBackend *blk, const uint8_t *buf, in blk_save_vmstate()
2639 int blk_load_vmstate(BlockBackend *blk, uint8_t *buf, int64_t pos, int size) in blk_load_vmstate()
2649 int blk_probe_blocksizes(BlockBackend *blk, BlockSizes *bsz) in blk_probe_blocksizes()
2661 int blk_probe_geometry(BlockBackend *blk, HDGeometry *geo) in blk_probe_geometry()
2675 void blk_update_root_state(BlockBackend *blk) in blk_update_root_state()
2688 bool blk_get_detect_zeroes_from_root_state(BlockBackend *blk) in blk_get_detect_zeroes_from_root_state()
2698 int blk_get_open_flags_from_root_state(BlockBackend *blk) in blk_get_open_flags_from_root_state()
2704 BlockBackendRootState *blk_get_root_state(BlockBackend *blk) in blk_get_root_state()
2712 BlockBackend *blk = NULL; in blk_commit_all()
2733 void blk_set_io_limits(BlockBackend *blk, ThrottleConfig *cfg) in blk_set_io_limits()
2739 void blk_io_limits_disable(BlockBackend *blk) in blk_io_limits_disable()
2757 void blk_io_limits_enable(BlockBackend *blk, const char *group) in blk_io_limits_enable()
2765 void blk_io_limits_update_group(BlockBackend *blk, const char *group) in blk_io_limits_update_group()
2786 BlockBackend *blk = child->opaque; in blk_root_drained_begin()
2805 BlockBackend *blk = child->opaque; in blk_root_drained_poll()
2817 BlockBackend *blk = child->opaque; in blk_root_drained_end()
2836 bool blk_register_buf(BlockBackend *blk, void *host, size_t size, Error **errp) in blk_register_buf()
2848 void blk_unregister_buf(BlockBackend *blk, void *host, size_t size) in blk_unregister_buf()
2859 int coroutine_fn blk_co_copy_range(BlockBackend *blk_in, int64_t off_in, in blk_co_copy_range()
2860 BlockBackend *blk_out, int64_t off_out, in blk_co_copy_range()
2882 const BdrvChild *blk_root(BlockBackend *blk) in blk_root()
2888 int blk_make_empty(BlockBackend *blk, Error **errp) in blk_make_empty()