Home
last modified time | relevance | path

Searched refs:bs (Results 1 – 25 of 158) sorted by relevance

1234567

/qemu/block/
H A Dio.c181 .bs = bs, in bdrv_refresh_limits()
187 memset(&bs->bl, 0, sizeof(bs->bl)); in bdrv_refresh_limits()
294 BlockDriverState *bs = data->bs; in bdrv_co_drain_bh_cb() local
327 .bs = bs, in bdrv_co_yield_to_drain()
615 .bs = bs, in tracked_request_begin()
787 BlockDriverState *bs = self->bs; in bdrv_wait_serialising_requests() local
904 BlockDriverState *bs = child->bs; in bdrv_make_zero() local
1164 BlockDriverState *bs = child->bs; in bdrv_co_do_copy_on_readv() local
2347 for (bs = bdrv_first(&it); bs; bs = bdrv_next(&it)) { in bdrv_flush_all()
3082 if (!bs || !bs->drv || !bdrv_co_is_inserted(bs)) { in bdrv_co_pdiscard()
[all …]
H A Draw-format.c104 real_size = bdrv_getlength(bs->file->bs); in raw_apply_options()
292 *file = bs->file->bs; in raw_co_block_status()
352 len = bdrv_co_getlength(bs->file->bs); in raw_co_getlength()
404 bs->bl.has_variable_length = bs->file->bs->bl.has_variable_length; in raw_refresh_limits()
438 bdrv_co_eject(bs->file->bs, eject_flag); in raw_co_eject()
459 return bdrv_has_zero_init(bs->file->bs); in raw_has_zero_init()
503 bs->sg = bdrv_is_sg(bs->file->bs); in raw_open()
509 bs->supported_truncate_flags = bs->file->bs->supported_truncate_flags & in raw_open()
513 bdrv_refresh_filename(bs->file->bs); in raw_open()
521 bs->file->bs->filename); in raw_open()
[all …]
H A Dsnapshot.c201 if (!drv || !bdrv_is_inserted(bs) || !bdrv_is_writable(bs)) { in bdrv_can_snapshot()
299 open_ret = drv->bdrv_open(bs, options, bs->open_flags, &local_err); in bdrv_snapshot_goto()
303 bs->drv = NULL; in bdrv_snapshot_goto()
371 bdrv_drained_begin(bs); in bdrv_snapshot_delete()
384 bdrv_drained_end(bs); in bdrv_snapshot_delete()
497 if (!bs) { in bdrv_all_get_snapshot_devices()
505 BlockDriverState *bs; in bdrv_all_get_snapshot_devices() local
507 for (bs = bdrv_first(&it); bs; bs = bdrv_next(&it)) { in bdrv_all_get_snapshot_devices()
522 if (!bdrv_is_inserted(bs) || bdrv_is_read_only(bs)) { in bdrv_all_snapshots_includes_bs()
528 return bdrv_has_blk(bs) || QLIST_EMPTY(&bs->parents); in bdrv_all_snapshots_includes_bs()
[all …]
H A Dfilter-compress.c41 if (!bs->file->bs->drv || !block_driver_can_compress(bs->file->bs->drv)) { in compress_open()
44 bdrv_get_format_name(bs->file->bs) ?: "(no format)"); in compress_open()
50 (BDRV_REQ_FUA & bs->file->bs->supported_write_flags); in compress_open()
54 bs->file->bs->supported_zero_flags); in compress_open()
61 compress_co_getlength(BlockDriverState *bs) in compress_co_getlength() argument
63 return bdrv_co_getlength(bs->file->bs); in compress_co_getlength()
108 if (!bs->file) { in compress_refresh_limits()
112 ret = bdrv_get_info(bs->file->bs, &bdi); in compress_refresh_limits()
117 bs->bl.request_alignment = bdi.cluster_size; in compress_refresh_limits()
124 bdrv_co_eject(bs->file->bs, eject_flag); in compress_co_eject()
[all …]
H A Ddirty-bitmap.c34 BlockDriverState *bs; member
126 bitmap->bs = bs; in bdrv_create_dirty_bitmap()
250 assert(bitmap->bs == bitmap->successor->bs); in bdrv_dirty_bitmap_enable_successor()
359 BlockDriverState *bs = bitmap->bs; in bdrv_release_dirty_bitmap() local
398 if (bs->drv && bs->drv->bdrv_co_remove_persistent_dirty_bitmap) { in bdrv_co_remove_persistent_dirty_bitmap()
408 if (bs->drv && bs->drv->bdrv_supports_persistent_dirty_bitmap) { in bdrv_supports_persistent_dirty_bitmap()
409 return bs->drv->bdrv_supports_persistent_dirty_bitmap(bs); in bdrv_supports_persistent_dirty_bitmap()
819 if (src->bs != dest->bs) { in bdrv_merge_dirty_bitmap()
843 if (src->bs != dest->bs) { in bdrv_merge_dirty_bitmap()
871 if (src->bs != dest->bs) { in bdrv_dirty_bitmap_merge_internal()
[all …]
H A Dpreallocate.c167 (BDRV_REQ_FUA & bs->file->bs->supported_write_flags); in preallocate_open()
171 bs->file->bs->supported_zero_flags); in preallocate_open()
183 s->file_end = bdrv_getlength(bs->file->bs); in preallocate_truncate_to_real_size()
329 uint32_t file_align = bs->file->bs->bl.request_alignment; in handle_write()
340 s->data_end = bdrv_co_getlength(bs->file->bs); in handle_write()
362 s->file_end = bdrv_co_getlength(bs->file->bs); in handle_write()
433 s->file_end = bdrv_co_getlength(bs->file->bs); in preallocate_co_truncate()
491 return bdrv_co_flush(bs->file->bs); in preallocate_co_flush()
504 ret = bdrv_co_getlength(bs->file->bs); in preallocate_co_getlength()
540 bdrv_child_refresh_perms(bs, bs->file, NULL); in preallocate_drop_resize()
[all …]
H A Dreplication.c185 return bdrv_co_getlength(bs->file->bs); in replication_co_getlength()
279 ret = bdrv_co_is_allocated_above(top->bs, base->bs, false, in replication_co_writev()
374 hidden_disk = bs->file->bs->backing; in reopen_backing_file()
436 if (top_bs == bs) { in check_top_bs()
442 if (child->bs == bs || check_top_bs(child->bs, bs)) { in check_top_bs()
463 s = bs->opaque; in replication_start()
499 if (!hidden_disk->bs || !hidden_disk->bs->backing) { in replication_start()
506 if (!secondary_disk->bs || !bdrv_has_blk(secondary_disk->bs)) { in replication_start()
525 assert(active_disk->bs->drv && hidden_disk->bs->drv); in replication_start()
557 s->secondary_disk = bdrv_attach_child(bs, secondary_disk->bs, in replication_start()
[all …]
H A Dthrottle.c79 ThrottleGroupMember *tgm = bs->opaque; in throttle_open()
90 bs->supported_write_flags = bs->file->bs->supported_write_flags | in throttle_open()
92 bs->supported_zero_flags = bs->file->bs->supported_zero_flags | in throttle_open()
107 ThrottleGroupMember *tgm = bs->opaque; in throttle_close()
115 return bdrv_co_getlength(bs->file->bs); in throttle_co_getlength()
123 ThrottleGroupMember *tgm = bs->opaque; in throttle_co_preadv()
133 ThrottleGroupMember *tgm = bs->opaque; in throttle_co_pwritev()
143 ThrottleGroupMember *tgm = bs->opaque; in throttle_co_pwrite_zeroes()
168 return bdrv_co_flush(bs->file->bs); in throttle_co_flush()
191 assert(reopen_state->bs != NULL); in throttle_reopen_prepare()
[all …]
H A Dcopy-on-read.c42 BDRVStateCOR *state = bs->opaque; in cor_open()
59 (BDRV_REQ_FUA & bs->file->bs->supported_write_flags); in cor_open()
63 bs->file->bs->supported_zero_flags); in cor_open()
122 if (!(bs->open_flags & BDRV_O_INACTIVE)) { in cor_child_perm()
130 return bdrv_co_getlength(bs->file->bs); in cor_co_getlength()
142 BDRVStateCOR *state = bs->opaque; in cor_co_preadv_part()
153 ret = bdrv_co_is_allocated(bs->file->bs, offset, bytes, &n); in cor_co_preadv_part()
155 ret = bdrv_co_is_allocated_above(bdrv_backing_chain_next(bs->file->bs), in cor_co_preadv_part()
223 bdrv_co_eject(bs->file->bs, eject_flag); in cor_co_eject()
230 bdrv_co_lock_medium(bs->file->bs, locked); in cor_co_lock_medium()
[all …]
H A Dcopy-before-write.c92 bdrv_dec_in_flight(bs); in block_copy_cb()
130 bdrv_inc_in_flight(bs); in cbw_do_copy_before_write()
189 if (!bs->file) { in cbw_co_flush()
193 return bdrv_co_flush(bs->file->bs); in cbw_co_flush()
237 *file = bs->file; in cbw_snapshot_read_lock()
340 pstrcpy(bs->exact_filename, sizeof(bs->exact_filename), in cbw_refresh_filename()
341 bs->file->bs->filename); in cbw_refresh_filename()
450 bs->total_sectors = bs->file->bs->total_sectors; in cbw_open()
452 (BDRV_REQ_FUA & bs->file->bs->supported_write_flags); in cbw_open()
455 bs->file->bs->supported_zero_flags); in cbw_open()
[all …]
H A Dblkverify.c28 BlockDriverState *bs; member
115 BDRVBlkverifyState *s = bs->opaque; in blkverify_open()
152 BDRVBlkverifyState *s = bs->opaque; in blkverify_close()
155 bdrv_unref_child(bs, s->test_file); in blkverify_close()
163 BDRVBlkverifyState *s = bs->opaque; in blkverify_co_getlength()
204 .bs = bs, in blkverify_co_prwv()
241 buf = qemu_blockalign(bs->file->bs, qiov->size); in blkverify_co_preadv()
287 return bdrv_recurse_can_replace(bs->file->bs, to_replace) || in blkverify_recurse_can_replace()
295 if (bs->file->bs->exact_filename[0] in blkverify_refresh_filename()
298 int ret = snprintf(bs->exact_filename, sizeof(bs->exact_filename), in blkverify_refresh_filename()
[all …]
H A Dqcow2.c1245 cache_clean_timer_init(bs, bdrv_get_aio_context(bs)); in qcow2_update_options_commit()
1674 bdrv_child_refresh_perms(bs, bs->file, &error_abort); in qcow2_do_open()
1743 pstrcpy(bs->backing_file, sizeof(bs->backing_file), in qcow2_do_open()
1935 .bs = bs, in qcow2_open()
2291 .bs = bs, in qcow2_add_task()
2591 crypt_buf = qemu_try_blockalign(bs->file->bs, bytes); in qcow2_co_pwritev_task()
3179 pstrcpy(bs->auto_backing_file, sizeof(bs->auto_backing_file), in qcow2_co_change_backing_file()
4164 if (bs->backing && bs->backing->bs) { in qcow2_co_copy_range_from()
4361 old_file_size = bdrv_co_getlength(bs->file->bs); in qcow2_co_truncate()
4454 old_file_size = bdrv_co_getlength(bs->file->bs); in qcow2_co_truncate()
[all …]
H A Dqcow2-cluster.c59 ret = bdrv_co_flush(bs->file->bs); in qcow2_shrink_l1_table()
130 new_l1_table = qemu_try_blockalign(bs->file->bs, new_l1_size2); in qcow2_grow_l1_table()
233 MIN(bs->file->bs->bl.request_alignment, s->cluster_size)); in qcow2_write_l1_entry()
507 if (!bs->drv) { in do_perform_cow_read()
528 ret = bs->drv->bdrv_co_preadv_part(bs, in do_perform_cow_read()
837 if (has_data_file(bs)) { in qcow2_alloc_compressed_cluster_offset()
963 if (bs->encrypted) { in perform_cow()
1046 ret = perform_cow(bs, m); in qcow2_alloc_cluster_link_l2()
1613 if (has_data_file(bs)) { in do_alloc_cluster_offset()
2187 if (!bs->backing) { in qcow2_subcluster_zeroize()
[all …]
H A Dblkreplay.c35 bs->supported_write_flags = BDRV_REQ_WRITE_UNCHANGED; in blkreplay_open()
36 bs->supported_zero_flags = BDRV_REQ_WRITE_UNCHANGED; in blkreplay_open()
44 blkreplay_co_getlength(BlockDriverState *bs) in blkreplay_co_getlength() argument
46 return bdrv_co_getlength(bs->file->bs); in blkreplay_co_getlength()
79 block_request_create(reqid, bs, qemu_coroutine_self()); in blkreplay_co_preadv()
91 block_request_create(reqid, bs, qemu_coroutine_self()); in blkreplay_co_pwritev()
103 block_request_create(reqid, bs, qemu_coroutine_self()); in blkreplay_co_pwrite_zeroes()
113 int ret = bdrv_co_pdiscard(bs->file, offset, bytes); in blkreplay_co_pdiscard()
123 int ret = bdrv_co_flush(bs->file->bs); in blkreplay_co_flush()
130 static int blkreplay_snapshot_goto(BlockDriverState *bs, in blkreplay_snapshot_goto() argument
[all …]
H A Dparallels.c210 payload_bytes = bdrv_getlength(bs->file->bs); in parallels_fill_used_bitmap()
348 if (bs->backing) { in allocate_clusters()
438 *file = bs->file->bs; in parallels_co_block_status()
667 file_size = bdrv_co_nb_sectors(bs->file->bs); in parallels_check_data_off()
707 size = bdrv_co_getlength(bs->file->bs); in parallels_check_outside_image()
749 size = bdrv_co_getlength(bs->file->bs); in parallels_check_leak()
1191 unsigned size = MAX(bdrv_opt_mem_align(bs->file->bs), in parallels_update_header()
1260 file_nb_sectors = bdrv_nb_sectors(bs->file->bs); in parallels_open()
1277 bs->total_sectors = 0xffffffff & bs->total_sectors; in parallels_open()
1303 s->header_size = ROUND_UP(size, bdrv_opt_mem_align(bs->file->bs)); in parallels_open()
[all …]
H A Dsnapshot-access.c30 snapshot_access_co_preadv_part(BlockDriverState *bs, in snapshot_access_co_preadv_part() argument
43 snapshot_access_co_block_status(BlockDriverState *bs, in snapshot_access_co_block_status() argument
48 return bdrv_co_snapshot_block_status(bs->file->bs, want_zero, offset, in snapshot_access_co_block_status()
55 return bdrv_co_pdiscard_snapshot(bs->file->bs, offset, bytes); in snapshot_access_co_pdiscard()
59 snapshot_access_co_pwrite_zeroes(BlockDriverState *bs, in snapshot_access_co_pwrite_zeroes() argument
67 snapshot_access_co_pwritev_part(BlockDriverState *bs, in snapshot_access_co_pwritev_part() argument
78 pstrcpy(bs->exact_filename, sizeof(bs->exact_filename), in snapshot_access_refresh_filename()
79 bs->file->bs->filename); in snapshot_access_refresh_filename()
85 bdrv_open_child(NULL, options, "file", bs, &child_of_bds, in snapshot_access_open()
91 if (!bs->file) { in snapshot_access_open()
[all …]
H A Dnull.c84 BDRVNullState *s = bs->opaque; in null_file_open()
105 BDRVNullState *s = bs->opaque; in null_co_getlength()
111 BDRVNullState *s = bs->opaque; in null_co_common()
124 BDRVNullState *s = bs->opaque; in null_co_preadv()
130 return null_co_common(bs); in null_co_preadv()
138 return null_co_common(bs); in null_co_pwritev()
143 return null_co_common(bs); in null_co_flush()
175 BDRVNullState *s = bs->opaque; in null_aio_common()
198 BDRVNullState *s = bs->opaque; in null_aio_preadv()
240 *file = bs; in null_co_block_status()
[all …]
H A Dblkdebug.c514 (BDRV_REQ_FUA & bs->file->bs->supported_write_flags); in blkdebug_open()
517 bs->file->bs->supported_zero_flags); in blkdebug_open()
527 align = MAX(s->align, bs->file->bs->bl.request_alignment); in blkdebug_open()
642 if (bs->bl.max_transfer) { in blkdebug_co_preadv()
683 return bdrv_co_flush(bs->file->bs); in blkdebug_co_flush()
767 assert(bs->file && bs->file->bs); in blkdebug_co_block_status()
770 *file = bs->file->bs; in blkdebug_co_block_status()
974 return bdrv_co_getlength(bs->file->bs); in blkdebug_co_getlength()
983 if (!bs->file->bs->exact_filename[0]) { in blkdebug_refresh_filename()
1001 ret = snprintf(bs->exact_filename, sizeof(bs->exact_filename), in blkdebug_refresh_filename()
[all …]
H A Dblkio.c354 blkio_submit_io(bs); in blkio_co_pdiscard()
387 blkio_submit_io(bs); in blkio_co_preadv()
432 blkio_submit_io(bs); in blkio_co_pwritev()
453 blkio_submit_io(bs); in blkio_co_flush()
481 blkio_submit_io(bs); in blkio_co_pwrite_zeroes()
913 blkio_attach_aio_context(bs, bdrv_get_aio_context(bs)); in blkio_file_open()
1010 (bs->bl.opt_transfer % bs->bl.request_alignment)) { in blkio_refresh_limits()
1024 if ((bs->bl.max_transfer % bs->bl.request_alignment) || in blkio_refresh_limits()
1025 (bs->bl.opt_transfer && (bs->bl.max_transfer % bs->bl.opt_transfer))) { in blkio_refresh_limits()
1028 bs->bl.max_transfer, bs->bl.request_alignment, in blkio_refresh_limits()
[all …]
H A Dqcow2-bitmap.c105 return !bdrv_is_read_only(bs) && !(bdrv_get_flags(bs) & BDRV_O_INACTIVE); in can_write()
112 ret = qcow2_update_header(bs); in update_header_sync()
117 return bdrv_flush(bs->file->bs); in update_header_sync()
163 BDRVQcow2State *s = bs->opaque; in check_constraints_on_bitmap()
210 BDRVQcow2State *s = bs->opaque; in clear_bitmap_table()
229 BDRVQcow2State *s = bs->opaque; in bitmap_table_load()
463 len = bdrv_getlength(bs); in check_dir_entry()
851 ret = update_header_sync(bs); in update_ext_header_and_dir_in_place()
1043 if (!can_write(bs)) { in qcow2_load_dirty_bitmaps()
1206 if (!can_write(bs->file->bs) || !(bs->file->perm & BLK_PERM_WRITE)) { in qcow2_reopen_bitmaps_rw()
[all …]
H A Dqcow2-refcount.c103 BDRVQcow2State *s = bs->opaque; in qcow2_refcount_init()
780 .bs = bs, in update_refcount_discard()
1168 if (has_data_file(bs)) { in qcow2_free_any_cluster()
1235 return bdrv_flush(bs->file->bs); in qcow2_flush_caches()
1422 ret = bdrv_flush(bs); in qcow2_update_snapshot_refcount()
1540 file_len = bdrv_co_getlength(bs->file->bs); in qcow2_inc_refcounts_imrt()
2136 size = bdrv_co_getlength(bs->file->bs); in check_refblocks()
2792 size = bdrv_co_getlength(bs->file->bs); in qcow2_check_refcounts()
3369 void *new_refblock = qemu_blockalign(bs->file->bs, s->cluster_size); in qcow2_change_refcount_order()
3726 file_length = bdrv_co_getlength(bs->file->bs); in qcow2_detect_metadata_preallocation()
[all …]
/qemu/
H A Dblock.c137 if (!bs || !bs->drv) { in bdrv_opt_mem_align()
148 if (!bs || !bs->drv) { in bdrv_min_mem_align()
2213 assert(a->bs == b->bs); in bdrv_a_allow_b()
3330 .bs = bs, in bdrv_set_inherits_from()
3563 drain_bs = bs->backing ? bs->backing->bs : bs; in bdrv_set_backing_hd()
5041 bs = reopen_state->bs; in bdrv_reopen_commit()
6654 if (bs && bs->drv && bs->drv->bdrv_debug_resume) { in bdrv_debug_resume()
7601 .bs = bs, in bdrv_change_aio_context()
7738 if (!bs || !bs->drv) { in bdrv_recurse_can_replace()
8185 if (!bs || !bs->drv) { in bdrv_cow_child()
[all …]
/qemu/include/block/
H A Dblock-io.h99 bdrv_co_delete_file_noerr(BlockDriverState *bs);
169 bool bdrv_is_read_only(BlockDriverState *bs);
170 bool bdrv_is_writable(BlockDriverState *bs);
171 bool bdrv_is_sg(BlockDriverState *bs);
172 int bdrv_get_flags(BlockDriverState *bs);
230 size_t bdrv_min_mem_align(BlockDriverState *bs);
232 size_t bdrv_opt_mem_align(BlockDriverState *bs);
257 bdrv_debug_event(child->bs, evt); \
357 void bdrv_drain(BlockDriverState *bs);
432 void bdrv_drained_begin(BlockDriverState *bs);
[all …]
H A Dblock_int-common.h77 BlockDriverState *bs; member
213 BlockDriverState *bs, Error **errp);
347 BlockDriverState *bs, Error **errp);
634 BlockDriverState *bs,
687 BlockDriverState *bs);
695 BlockDriverState *bs);
715 BlockDriverState *bs);
718 BlockDriverState *bs);
755 BlockDriverState *bs);
1018 BlockDriverState *bs; member
[all …]
H A Dblock-global-state.h81 int bdrv_drop_filter(BlockDriverState *bs, Error **errp);
142 int bdrv_commit(BlockDriverState *bs);
179 bdrv_activate(BlockDriverState *bs, Error **errp);
182 bdrv_co_activate(BlockDriverState *bs, Error **errp);
196 int bdrv_has_zero_init_1(BlockDriverState *bs);
207 BlockDriverState *bdrv_next_node(BlockDriverState *bs);
216 BlockDriverState *bs; member
237 void bdrv_ref(BlockDriverState *bs);
238 void no_coroutine_fn bdrv_unref(BlockDriverState *bs);
263 bool bdrv_op_blocker_is_empty(BlockDriverState *bs);
[all …]

1234567