Lines Matching refs:bs
302 BlockDriverState* bs; /* pointer to parent */ member
382 lba |= sector2CHS(&partition->end_CHS, s->bs->total_sectors - 1, in init_mbr()
387 partition->length_sector_long = cpu_to_le32(s->bs->total_sectors in init_mbr()
1054 static int enable_write_target(BlockDriverState *bs, Error **errp);
1137 static int vvfat_open(BlockDriverState *bs, QDict *options, int flags, in vvfat_open() argument
1140 BDRVVVFATState *s = bs->opaque; in vvfat_open()
1220 s->bs = bs; in vvfat_open()
1236 bs->total_sectors = cyls * heads * secs; in vvfat_open()
1239 if (!bdrv_is_read_only(bs)) { in vvfat_open()
1240 ret = enable_write_target(bs, errp); in vvfat_open()
1251 ret = bdrv_apply_auto_read_only(bs, NULL, errp); in vvfat_open()
1270 bdrv_get_device_or_node_name(bs)); in vvfat_open()
1299 static void vvfat_refresh_limits(BlockDriverState *bs, Error **errp) in vvfat_refresh_limits() argument
1301 bs->bl.request_alignment = BDRV_SECTOR_SIZE; /* No sub-sector I/O */ in vvfat_refresh_limits()
1476 vvfat_read(BlockDriverState *bs, int64_t sector_num, uint8_t *buf, int nb_sectors) in vvfat_read() argument
1478 BDRVVVFATState *s = bs->opaque; in vvfat_read()
1482 if (sector_num >= bs->total_sectors) in vvfat_read()
1487 ret = bdrv_co_is_allocated(s->qcow->bs, sector_num * BDRV_SECTOR_SIZE, in vvfat_read()
1539 vvfat_co_preadv(BlockDriverState *bs, int64_t offset, int64_t bytes, in vvfat_co_preadv() argument
1543 BDRVVVFATState *s = bs->opaque; in vvfat_co_preadv()
1557 ret = vvfat_read(bs, sector_num, buf, nb_sectors); in vvfat_co_preadv()
1813 was_modified = bdrv_co_is_allocated(s->qcow->bs, in cluster_was_modified()
1969 res = bdrv_co_is_allocated(s->qcow->bs, in get_cluster_count_for_direntry()
1976 res = vvfat_read(s->bs, offs, s->cluster_buffer, 1); in get_cluster_count_for_direntry()
2058 subret = vvfat_read(s->bs, cluster2sector(s, cluster_num), cluster, in check_directory_consistency()
2164 check = vvfat_read(s->bs, in is_consistent()
2470 ret = vvfat_read(s->bs, cluster2sector(s, c), (uint8_t *)direntry, in commit_direntries()
2556 ret = vvfat_read(s->bs, cluster2sector(s, c), in commit_one_file()
2978 vvfat_write(BlockDriverState *bs, int64_t sector_num, in vvfat_write() argument
2981 BDRVVVFATState *s = bs->opaque; in vvfat_write()
3110 vvfat_co_pwritev(BlockDriverState *bs, int64_t offset, int64_t bytes, in vvfat_co_pwritev() argument
3114 BDRVVVFATState *s = bs->opaque; in vvfat_co_pwritev()
3129 ret = vvfat_write(bs, sector_num, buf, nb_sectors); in vvfat_co_pwritev()
3137 static int coroutine_fn vvfat_co_block_status(BlockDriverState *bs, in vvfat_co_block_status() argument
3158 static int enable_write_target(BlockDriverState *bs, Error **errp) in enable_write_target() argument
3160 BDRVVVFATState *s = bs->opaque; in enable_write_target()
3186 bs->total_sectors * BDRV_SECTOR_SIZE, &error_abort); in enable_write_target()
3197 s->qcow = bdrv_open_child(s->qcow_filename, options, "write-target", bs, in enable_write_target()
3217 static void vvfat_child_perm(BlockDriverState *bs, BdrvChild *c, in vvfat_child_perm() argument
3229 static void vvfat_close(BlockDriverState *bs) in vvfat_close() argument
3231 BDRVVVFATState *s = bs->opaque; in vvfat_close()