Lines Matching refs:bs

276 static int coroutine_fn vdi_co_check(BlockDriverState *bs, BdrvCheckResult *res,  in vdi_co_check()  argument
280 BDRVVdiState *s = (BDRVVdiState *)bs->opaque; in vdi_co_check()
331 vdi_co_get_info(BlockDriverState *bs, BlockDriverInfo *bdi) in vdi_co_get_info() argument
335 BDRVVdiState *s = (BDRVVdiState *)bs->opaque; in vdi_co_get_info()
342 static int vdi_make_empty(BlockDriverState *bs) in vdi_make_empty() argument
372 static int vdi_open(BlockDriverState *bs, QDict *options, int flags, in vdi_open() argument
375 BDRVVdiState *s = bs->opaque; in vdi_open()
381 ret = bdrv_open_file_child(NULL, options, "file", bs, errp); in vdi_open()
390 ret = bdrv_pread(bs->file, 0, sizeof(header), &header, 0); in vdi_open()
476 bs->total_sectors = header.disk_size / SECTOR_SIZE; in vdi_open()
484 s->bmap = qemu_try_blockalign(bs->file->bs, bmap_size * SECTOR_SIZE); in vdi_open()
490 ret = bdrv_pread(bs->file, header.offset_bmap, bmap_size * SECTOR_SIZE, in vdi_open()
499 bdrv_get_device_or_node_name(bs)); in vdi_open()
524 vdi_co_block_status(BlockDriverState *bs, bool want_zero, int64_t offset, in vdi_co_block_status() argument
528 BDRVVdiState *s = (BDRVVdiState *)bs->opaque; in vdi_co_block_status()
534 logout("%p, %" PRId64 ", %" PRId64 ", %p\n", bs, offset, bytes, pnum); in vdi_co_block_status()
543 *file = bs->file->bs; in vdi_co_block_status()
549 vdi_co_preadv(BlockDriverState *bs, int64_t offset, int64_t bytes, in vdi_co_preadv() argument
552 BDRVVdiState *s = bs->opaque; in vdi_co_preadv()
589 ret = bdrv_co_preadv(bs->file, data_offset, n_bytes, in vdi_co_preadv()
605 vdi_co_pwritev(BlockDriverState *bs, int64_t offset, int64_t bytes, in vdi_co_pwritev() argument
608 BDRVVdiState *s = bs->opaque; in vdi_co_pwritev()
667 ret = bdrv_co_pwrite(bs->file, data_offset, s->block_size, block, in vdi_co_pwritev()
680 ret = bdrv_co_pwritev(bs->file, data_offset, n_bytes, in vdi_co_pwritev()
713 ret = bdrv_co_pwrite(bs->file, 0, sizeof(*header), header, 0); in vdi_co_pwritev()
730 ret = bdrv_co_pwrite(bs->file, bmap_offset * SECTOR_SIZE, in vdi_co_pwritev()
984 static void vdi_close(BlockDriverState *bs) in vdi_close() argument
986 BDRVVdiState *s = bs->opaque; in vdi_close()
993 static int GRAPH_RDLOCK vdi_has_zero_init(BlockDriverState *bs) in vdi_has_zero_init() argument
995 BDRVVdiState *s = bs->opaque; in vdi_has_zero_init()
998 return bdrv_has_zero_init(bs->file->bs); in vdi_has_zero_init()