Home
last modified time | relevance | path

Searched refs:BlockDriverState (Results 1 – 25 of 72) sorted by relevance

123

/openbmc/qemu/include/block/
H A Dblock-io.h80 int64_t coroutine_fn GRAPH_RDLOCK bdrv_co_nb_sectors(BlockDriverState *bs);
81 int64_t coroutine_mixed_fn bdrv_nb_sectors(BlockDriverState *bs);
83 int64_t coroutine_fn GRAPH_RDLOCK bdrv_co_getlength(BlockDriverState *bs);
84 int64_t co_wrapper_mixed_bdrv_rdlock bdrv_getlength(BlockDriverState *bs);
87 bdrv_co_get_allocated_file_size(BlockDriverState *bs);
90 bdrv_get_allocated_file_size(BlockDriverState *bs);
93 BlockDriverState *in_bs, Error **errp);
96 bdrv_co_delete_file(BlockDriverState *bs, Error **errp);
99 bdrv_co_delete_file_noerr(BlockDriverState *bs);
107 bdrv_co_ioctl(BlockDriverState *bs, int req, void *buf);
[all …]
H A Dblock_int-global-state.h67 void stream_start(const char *job_id, BlockDriverState *bs,
68 BlockDriverState *base, const char *backing_file_str,
70 BlockDriverState *bottom,
96 void commit_start(const char *job_id, BlockDriverState *bs,
97 BlockDriverState *base, BlockDriverState *top,
121 BlockJob *commit_active_start(const char *job_id, BlockDriverState *bs,
122 BlockDriverState *base, int creation_flags,
157 void mirror_start(const char *job_id, BlockDriverState *bs,
158 BlockDriverState *target, const char *replaces,
192 BlockJob *backup_job_create(const char *job_id, BlockDriverState *bs,
[all …]
H A Dsnapshot.h56 int bdrv_snapshot_find(BlockDriverState *bs, QEMUSnapshotInfo *sn_info,
58 bool bdrv_snapshot_find_by_id_and_name(BlockDriverState *bs,
64 int GRAPH_RDLOCK bdrv_can_snapshot(BlockDriverState *bs);
67 bdrv_snapshot_create(BlockDriverState *bs, QEMUSnapshotInfo *sn_info);
70 bdrv_snapshot_goto(BlockDriverState *bs, const char *snapshot_id, Error **errp);
73 bdrv_snapshot_delete(BlockDriverState *bs, const char *snapshot_id,
76 int bdrv_snapshot_list(BlockDriverState *bs,
78 int bdrv_snapshot_load_tmp(BlockDriverState *bs,
82 int bdrv_snapshot_load_tmp_by_id_or_name(BlockDriverState *bs,
103 BlockDriverState *vm_state_bs,
[all …]
H A Ddirty-bitmap.h20 bool bdrv_supports_persistent_dirty_bitmap(BlockDriverState *bs);
21 BdrvDirtyBitmap *bdrv_create_dirty_bitmap(BlockDriverState *bs,
32 BdrvDirtyBitmap *bdrv_find_dirty_bitmap(BlockDriverState *bs,
37 void bdrv_release_named_dirty_bitmaps(BlockDriverState *bs);
40 bdrv_co_remove_persistent_dirty_bitmap(BlockDriverState *bs, const char *name,
43 bdrv_remove_persistent_dirty_bitmap(BlockDriverState *bs, const char *name,
49 BlockDirtyInfoList *bdrv_query_dirty_bitmaps(BlockDriverState *bs);
50 uint32_t bdrv_get_default_bitmap_granularity(BlockDriverState *bs);
103 void bdrv_dirty_bitmap_truncate(BlockDriverState *bs, int64_t bytes);
105 bool bdrv_has_readonly_bitmaps(BlockDriverState *bs);
[all …]
H A Dwrite-threshold.h26 void bdrv_write_threshold_set(BlockDriverState *bs, uint64_t threshold_bytes);
34 uint64_t bdrv_write_threshold_get(const BlockDriverState *bs);
42 void bdrv_write_threshold_check_write(BlockDriverState *bs, int64_t offset,
/openbmc/qemu/block/
H A Dcoroutines.h41 bdrv_co_check(BlockDriverState *bs, BdrvCheckResult *res, BdrvCheckMode fix);
44 bdrv_co_invalidate_cache(BlockDriverState *bs, Error **errp);
47 bdrv_co_common_block_status_above(BlockDriverState *bs,
48 BlockDriverState *base,
55 BlockDriverState **file,
59 bdrv_co_readv_vmstate(BlockDriverState *bs, QEMUIOVector *qiov, int64_t pos);
62 bdrv_co_writev_vmstate(BlockDriverState *bs, QEMUIOVector *qiov, int64_t pos);
65 nbd_co_do_establish_connection(BlockDriverState *bs, bool blocking,
78 bdrv_common_block_status_above(BlockDriverState *bs,
79 BlockDriverState *base,
[all …]
H A Dsnapshot-access.c30 snapshot_access_co_preadv_part(BlockDriverState *bs, in snapshot_access_co_preadv_part()
43 snapshot_access_co_block_status(BlockDriverState *bs, in snapshot_access_co_block_status()
46 int64_t *map, BlockDriverState **file) in snapshot_access_co_block_status()
53 snapshot_access_co_pdiscard(BlockDriverState *bs, int64_t offset, int64_t bytes) in snapshot_access_co_pdiscard()
59 snapshot_access_co_pwrite_zeroes(BlockDriverState *bs, in snapshot_access_co_pwrite_zeroes()
67 snapshot_access_co_pwritev_part(BlockDriverState *bs, in snapshot_access_co_pwritev_part()
76 static void GRAPH_RDLOCK snapshot_access_refresh_filename(BlockDriverState *bs) in snapshot_access_refresh_filename()
82 static int snapshot_access_open(BlockDriverState *bs, QDict *options, int flags, in snapshot_access_open()
100 static void snapshot_access_child_perm(BlockDriverState *bs, BdrvChild *c, in snapshot_access_child_perm()
H A Dcopy-on-read.c33 BlockDriverState *bottom_bs;
39 cor_open(BlockDriverState *bs, QDict *options, int flags, Error **errp) in cor_open()
41 BlockDriverState *bottom_bs = NULL; in cor_open()
111 static void cor_child_perm(BlockDriverState *bs, BdrvChild *c, in cor_child_perm()
128 static int64_t coroutine_fn GRAPH_RDLOCK cor_co_getlength(BlockDriverState *bs) in cor_co_getlength()
135 cor_co_preadv_part(BlockDriverState *bs, int64_t offset, int64_t bytes, in cor_co_preadv_part()
187 cor_co_pwritev_part(BlockDriverState *bs, int64_t offset, int64_t bytes, in cor_co_pwritev_part()
197 cor_co_pwrite_zeroes(BlockDriverState *bs, int64_t offset, int64_t bytes, in cor_co_pwrite_zeroes()
205 cor_co_pdiscard(BlockDriverState *bs, int64_t offset, int64_t bytes) in cor_co_pdiscard()
212 cor_co_pwritev_compressed(BlockDriverState *bs, int64_t offset, int64_t bytes, in cor_co_pwritev_compressed()
[all …]
H A Dsnapshot.c53 int bdrv_snapshot_find(BlockDriverState *bs, QEMUSnapshotInfo *sn_info, in bdrv_snapshot_find()
98 bool bdrv_snapshot_find_by_id_and_name(BlockDriverState *bs, in bdrv_snapshot_find_by_id_and_name()
158 bdrv_snapshot_fallback_child(BlockDriverState *bs) in bdrv_snapshot_fallback_child()
188 static BlockDriverState * GRAPH_RDLOCK
189 bdrv_snapshot_fallback(BlockDriverState *bs) in bdrv_snapshot_fallback()
195 int bdrv_can_snapshot(BlockDriverState *bs) in bdrv_can_snapshot()
206 BlockDriverState *fallback_bs = bdrv_snapshot_fallback(bs); in bdrv_can_snapshot()
216 int bdrv_snapshot_create(BlockDriverState *bs, in bdrv_snapshot_create()
220 BlockDriverState *fallback_bs = bdrv_snapshot_fallback(bs); in bdrv_snapshot_create()
236 int bdrv_snapshot_goto(BlockDriverState *bs, in bdrv_snapshot_goto()
[all …]
H A Dfilter-compress.c31 static int compress_open(BlockDriverState *bs, QDict *options, int flags, in compress_open()
61 compress_co_getlength(BlockDriverState *bs) in compress_co_getlength()
68 compress_co_preadv_part(BlockDriverState *bs, int64_t offset, int64_t bytes, in compress_co_preadv_part()
78 compress_co_pwritev_part(BlockDriverState *bs, int64_t offset, int64_t bytes, in compress_co_pwritev_part()
88 compress_co_pwrite_zeroes(BlockDriverState *bs, int64_t offset, int64_t bytes, in compress_co_pwrite_zeroes()
96 compress_co_pdiscard(BlockDriverState *bs, int64_t offset, int64_t bytes) in compress_co_pdiscard()
103 compress_refresh_limits(BlockDriverState *bs, Error **errp) in compress_refresh_limits()
122 compress_co_eject(BlockDriverState *bs, bool eject_flag) in compress_co_eject()
129 compress_co_lock_medium(BlockDriverState *bs, bool locked) in compress_co_lock_medium()
H A Dthrottle.c76 static int throttle_open(BlockDriverState *bs, QDict *options, in throttle_open()
105 static void throttle_close(BlockDriverState *bs) in throttle_close()
113 throttle_co_getlength(BlockDriverState *bs) in throttle_co_getlength()
119 throttle_co_preadv(BlockDriverState *bs, int64_t offset, int64_t bytes, in throttle_co_preadv()
130 throttle_co_pwritev(BlockDriverState *bs, int64_t offset, int64_t bytes, in throttle_co_pwritev()
140 throttle_co_pwrite_zeroes(BlockDriverState *bs, int64_t offset, int64_t bytes, in throttle_co_pwrite_zeroes()
150 throttle_co_pdiscard(BlockDriverState *bs, int64_t offset, int64_t bytes) in throttle_co_pdiscard()
159 throttle_co_pwritev_compressed(BlockDriverState *bs, int64_t offset, in throttle_co_pwritev_compressed()
166 static int coroutine_fn GRAPH_RDLOCK throttle_co_flush(BlockDriverState *bs) in throttle_co_flush()
171 static void throttle_detach_aio_context(BlockDriverState *bs) in throttle_detach_aio_context()
[all …]
H A Dcopy-before-write.h39 BlockDriverState *bdrv_cbw_append(BlockDriverState *source,
40 BlockDriverState *target,
47 void bdrv_cbw_drop(BlockDriverState *bs);
H A Dstream.c36 BlockDriverState *base_overlay; /* COW overlay (stream from this) */
37 BlockDriverState *above_base; /* Node directly above the base */
38 BlockDriverState *cor_filter_bs;
39 BlockDriverState *target_bs;
57 BlockDriverState *unfiltered_bs; in stream_prepare()
58 BlockDriverState *unfiltered_bs_cow; in stream_prepare()
59 BlockDriverState *base; in stream_prepare()
60 BlockDriverState *unfiltered_base; in stream_prepare()
155 BlockDriverState *unfiltered_bs = NULL; in stream_run()
251 void stream_start(const char *job_id, BlockDriverState *bs, in stream_start()
[all …]
H A Dcopy-before-write.c84 cbw_co_preadv(BlockDriverState *bs, int64_t offset, int64_t bytes, in cbw_co_preadv()
92 BlockDriverState *bs = opaque; in block_copy_cb()
106 static coroutine_fn int cbw_do_copy_before_write(BlockDriverState *bs, in cbw_do_copy_before_write()
155 cbw_co_pdiscard(BlockDriverState *bs, int64_t offset, int64_t bytes) in cbw_co_pdiscard()
166 cbw_co_pwrite_zeroes(BlockDriverState *bs, int64_t offset, int64_t bytes, in cbw_co_pwrite_zeroes()
178 int cbw_co_pwritev(BlockDriverState *bs, int64_t offset, int64_t bytes, in cbw_co_pwritev()
189 static int coroutine_fn GRAPH_RDLOCK cbw_co_flush(BlockDriverState *bs) in cbw_co_flush()
209 cbw_snapshot_read_lock(BlockDriverState *bs, int64_t offset, int64_t bytes, in cbw_snapshot_read_lock()
246 cbw_snapshot_read_unlock(BlockDriverState *bs, BlockReq *req) in cbw_snapshot_read_unlock()
262 cbw_co_preadv_snapshot(BlockDriverState *bs, int64_t offset, int64_t bytes, in cbw_co_preadv_snapshot()
[all …]
H A Dwrite-threshold.c21 uint64_t bdrv_write_threshold_get(const BlockDriverState *bs) in bdrv_write_threshold_get()
26 void bdrv_write_threshold_set(BlockDriverState *bs, uint64_t threshold_bytes) in bdrv_write_threshold_set()
35 BlockDriverState *bs; in qmp_block_set_write_threshold()
46 void bdrv_write_threshold_check_write(BlockDriverState *bs, int64_t offset, in bdrv_write_threshold_check_write()
H A Dblkverify.c28 BlockDriverState *bs;
112 static int blkverify_open(BlockDriverState *bs, QDict *options, int flags, in blkverify_open()
150 static void blkverify_close(BlockDriverState *bs) in blkverify_close()
161 blkverify_co_getlength(BlockDriverState *bs) in blkverify_co_getlength()
196 blkverify_co_prwv(BlockDriverState *bs, BlkverifyRequest *r, uint64_t offset, in blkverify_co_prwv()
232 blkverify_co_preadv(BlockDriverState *bs, int64_t offset, int64_t bytes, in blkverify_co_preadv()
261 blkverify_co_pwritev(BlockDriverState *bs, int64_t offset, int64_t bytes, in blkverify_co_pwritev()
268 static int coroutine_fn GRAPH_RDLOCK blkverify_co_flush(BlockDriverState *bs) in blkverify_co_flush()
277 blkverify_recurse_can_replace(BlockDriverState *bs, in blkverify_recurse_can_replace()
278 BlockDriverState *to_replace) in blkverify_recurse_can_replace()
[all …]
H A Dpreallocate.c83 static int preallocate_drop_resize(BlockDriverState *bs, Error **errp);
108 BlockDriverState *child_bs, Error **errp) in preallocate_absorb_opts()
140 static int preallocate_open(BlockDriverState *bs, QDict *options, int flags, in preallocate_open()
177 preallocate_truncate_to_real_size(BlockDriverState *bs, Error **errp) in preallocate_truncate_to_real_size()
204 static void preallocate_close(BlockDriverState *bs) in preallocate_close()
278 preallocate_co_preadv_part(BlockDriverState *bs, int64_t offset, int64_t bytes, in preallocate_co_preadv_part()
287 preallocate_co_pdiscard(BlockDriverState *bs, int64_t offset, int64_t bytes) in preallocate_co_pdiscard()
297 static bool GRAPH_RDLOCK has_prealloc_perms(BlockDriverState *bs) in has_prealloc_perms()
322 handle_write(BlockDriverState *bs, int64_t offset, int64_t bytes, in handle_write()
399 preallocate_co_pwrite_zeroes(BlockDriverState *bs, int64_t offset, in preallocate_co_pwrite_zeroes()
[all …]
H A Dcommit.c38 BlockDriverState *commit_top_bs;
41 BlockDriverState *base_bs;
42 BlockDriverState *base_overlay;
74 BlockDriverState *top_bs = blk_bs(s->top); in commit_abort()
75 BlockDriverState *commit_top_backing_bs; in commit_abort()
271 bdrv_commit_top_preadv(BlockDriverState *bs, int64_t offset, int64_t bytes, in bdrv_commit_top_preadv()
277 static GRAPH_RDLOCK void bdrv_commit_top_refresh_filename(BlockDriverState *bs) in bdrv_commit_top_refresh_filename()
283 static void bdrv_commit_top_child_perm(BlockDriverState *bs, BdrvChild *c, in bdrv_commit_top_child_perm()
305 void commit_start(const char *job_id, BlockDriverState *bs, in commit_start()
306 BlockDriverState *base, BlockDriverState *top, in commit_start()
[all …]
H A Dreplication.c82 static int replication_open(BlockDriverState *bs, QDict *options, in replication_open()
139 static void replication_close(BlockDriverState *bs) in replication_close()
161 static void replication_child_perm(BlockDriverState *bs, BdrvChild *c, in replication_child_perm()
182 replication_co_getlength(BlockDriverState *bs) in replication_co_getlength()
224 replication_co_readv(BlockDriverState *bs, int64_t sector_num, in replication_co_readv()
247 replication_co_writev(BlockDriverState *bs, int64_t sector_num, in replication_co_writev()
310 secondary_do_checkpoint(BlockDriverState *bs, Error **errp) in secondary_do_checkpoint()
359 static void reopen_backing_file(BlockDriverState *bs, bool writable, in reopen_backing_file()
401 static void backup_job_cleanup(BlockDriverState *bs) in backup_job_cleanup()
404 BlockDriverState *top_bs; in backup_job_cleanup()
[all …]
H A Dblkio.c234 BlockDriverState *bs = opaque; in blkio_completion_fd_read()
279 BlockDriverState *bs = opaque; in blkio_completion_fd_poll()
299 static void blkio_attach_aio_context(BlockDriverState *bs, in blkio_attach_aio_context()
310 static void blkio_detach_aio_context(BlockDriverState *bs) in blkio_detach_aio_context()
335 static void blkio_submit_io(BlockDriverState *bs) in blkio_submit_io()
343 blkio_co_pdiscard(BlockDriverState *bs, int64_t offset, int64_t bytes) in blkio_co_pdiscard()
360 blkio_co_preadv(BlockDriverState *bs, int64_t offset, int64_t bytes, in blkio_co_preadv()
403 static int coroutine_fn blkio_co_pwritev(BlockDriverState *bs, int64_t offset, in blkio_co_pwritev()
442 static int coroutine_fn blkio_co_flush(BlockDriverState *bs) in blkio_co_flush()
458 static int coroutine_fn blkio_co_pwrite_zeroes(BlockDriverState *bs, in blkio_co_pwrite_zeroes()
[all …]
/openbmc/qemu/tests/unit/
H A Dtest-bdrv-graph-mod.c34 static void no_perm_default_perms(BlockDriverState *bs, BdrvChild *c, in no_perm_default_perms()
50 static void exclusive_write_perms(BlockDriverState *bs, BdrvChild *c, in exclusive_write_perms()
67 static BlockDriverState *no_perm_node(const char *name) in no_perm_node()
72 static BlockDriverState *pass_through_node(const char *name) in pass_through_node()
78 static BlockDriverState *exclusive_writer_node(const char *name) in exclusive_writer_node()
135 BlockDriverState *bs = no_perm_node("node"); in test_update_perm_tree()
136 BlockDriverState *filter = pass_through_node("filter"); in test_update_perm_tree()
199 BlockDriverState *bs = no_perm_node("node"); in test_should_update_child()
200 BlockDriverState *filter = no_perm_node("filter"); in test_should_update_child()
201 BlockDriverState *target = no_perm_node("target"); in test_should_update_child()
[all …]
H A Dtest-bdrv-drain.c43 BlockDriverState *bs = opaque; in sleep_in_drain_begin()
49 static void bdrv_test_drain_begin(BlockDriverState *bs) in bdrv_test_drain_begin()
60 static void bdrv_test_drain_end(BlockDriverState *bs) in bdrv_test_drain_end()
66 static void bdrv_test_close(BlockDriverState *bs) in bdrv_test_close()
77 static int coroutine_fn bdrv_test_co_preadv(BlockDriverState *bs, in bdrv_test_co_preadv()
99 static int bdrv_test_co_change_backing_file(BlockDriverState *bs, in bdrv_test_co_change_backing_file()
162 static void do_drain_begin(enum drain_type drain_type, BlockDriverState *bs) in do_drain_begin()
171 static void do_drain_end(enum drain_type drain_type, BlockDriverState *bs) in do_drain_end()
180 static void do_drain_begin_unlocked(enum drain_type drain_type, BlockDriverState *bs) in do_drain_begin_unlocked()
188 BlockDriverState *bs, *backing; in test_setup()
[all …]
/openbmc/qemu/block/monitor/
H A Dbitmap-qmp-cmds.c55 BlockDriverState **pbs, in block_dirty_bitmap_lookup()
58 BlockDriverState *bs; in block_dirty_bitmap_lookup()
96 BlockDriverState *bs; in qmp_block_dirty_bitmap_add()
148 BlockDriverState **bitmap_bs, in block_dirty_bitmap_remove()
151 BlockDriverState *bs; in block_dirty_bitmap_remove()
197 BlockDriverState *bs; in qmp_block_dirty_bitmap_clear()
214 BlockDriverState *bs; in qmp_block_dirty_bitmap_enable()
232 BlockDriverState *bs; in qmp_block_dirty_bitmap_disable()
252 BlockDriverState *bs; in block_dirty_bitmap_merge()
/openbmc/qemu/stubs/
H A Dbdrv-next-monitor-owned.c4 BlockDriverState *bdrv_next_monitor_owned(BlockDriverState *bs) in bdrv_next_monitor_owned()
/openbmc/qemu/include/system/
H A Dblock-backend-global-state.h28 blk_new_with_bs(BlockDriverState *bs, uint64_t perm, uint64_t shared_perm,
32 blk_co_new_with_bs(BlockDriverState *bs, uint64_t perm, uint64_t shared_perm,
59 int blk_insert_bs(BlockBackend *blk, BlockDriverState *bs, Error **errp);
60 int blk_replace_bs(BlockBackend *blk, BlockDriverState *new_bs, Error **errp);
61 bool GRAPH_RDLOCK bdrv_has_blk(BlockDriverState *bs);
62 bool GRAPH_RDLOCK bdrv_is_root_node(BlockDriverState *bs);

123