/openbmc/qemu/block/ |
H A D | parallels.c | 118 static int64_t seek_to_sector(BDRVParallelsState *s, int64_t sector_num) in seek_to_sector() argument 122 index = sector_num / s->tracks; in seek_to_sector() 123 offset = sector_num % s->tracks; in seek_to_sector() 132 static int cluster_remainder(BDRVParallelsState *s, int64_t sector_num, in cluster_remainder() argument 135 int ret = s->tracks - sector_num % s->tracks; in cluster_remainder() 145 static int64_t block_status(BDRVParallelsState *s, int64_t sector_num, in block_status() argument 152 int64_t offset = seek_to_sector(s, sector_num); in block_status() 162 to_end = cluster_remainder(s, sector_num, nb_sectors); in block_status() 164 sector_num += to_end; in block_status() 251 allocate_clusters(BlockDriverState *bs, int64_t sector_num, in allocate_clusters() argument [all …]
|
H A D | dmg.c | 599 uint32_t chunk_num, uint64_t sector_num) in is_sector_in_chunk() argument 601 if (chunk_num >= s->n_chunks || s->sectors[chunk_num] > sector_num || in is_sector_in_chunk() 602 s->sectors[chunk_num] + s->sectorcounts[chunk_num] <= sector_num) { in is_sector_in_chunk() 609 static inline uint32_t search_chunk(BDRVDMGState *s, uint64_t sector_num) in search_chunk() argument 615 if (s->sectors[chunk3] > sector_num) { in search_chunk() 620 } else if (s->sectors[chunk3] + s->sectorcounts[chunk3] > sector_num) { in search_chunk() 631 dmg_read_chunk(BlockDriverState *bs, uint64_t sector_num) in dmg_read_chunk() argument 635 if (!is_sector_in_chunk(s, s->current_chunk, sector_num)) { in dmg_read_chunk() 637 uint32_t chunk = search_chunk(s, sector_num); in dmg_read_chunk() 733 uint64_t sector_num = offset >> BDRV_SECTOR_BITS; in dmg_co_preadv() local [all …]
|
H A D | bochs.c | 213 seek_to_sector(BlockDriverState *bs, int64_t sector_num) in seek_to_sector() argument 216 uint64_t offset = sector_num * 512; in seek_to_sector() 252 uint64_t sector_num = offset >> BDRV_SECTOR_BITS; in bochs_co_preadv() local 265 int64_t block_offset = seek_to_sector(bs, sector_num); in bochs_co_preadv() 284 sector_num++; in bochs_co_preadv()
|
H A D | vvfat.c | 886 static inline int32_t sector2cluster(BDRVVVFATState* s,off_t sector_num) in sector2cluster() argument 888 return (sector_num - s->offset_to_root_dir) / s->sectors_per_cluster; in sector2cluster() 1476 vvfat_read(BlockDriverState *bs, int64_t sector_num, uint8_t *buf, int nb_sectors) in vvfat_read() argument 1481 for(i=0;i<nb_sectors;i++,sector_num++) { 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() 1494 " allocated\n", sector_num, in vvfat_read() 1496 if (bdrv_co_pread(s->qcow, sector_num * BDRV_SECTOR_SIZE, n, in vvfat_read() 1501 sector_num += (n >> BDRV_SECTOR_BITS) - 1; in vvfat_read() 1505 sector_num)); in vvfat_read() [all …]
|
H A D | replication.c | 225 replication_co_readv(BlockDriverState *bs, int64_t sector_num, in replication_co_readv() argument 241 ret = bdrv_co_preadv(bs->file, sector_num * BDRV_SECTOR_SIZE, in replication_co_readv() 248 replication_co_writev(BlockDriverState *bs, int64_t sector_num, in replication_co_writev() argument 266 ret = bdrv_co_pwritev(top, sector_num * BDRV_SECTOR_SIZE, in replication_co_writev() 280 sector_num * BDRV_SECTOR_SIZE, in replication_co_writev() 293 ret = bdrv_co_pwritev(target, sector_num * BDRV_SECTOR_SIZE, in replication_co_writev() 300 sector_num += n; in replication_co_writev()
|
H A D | cloop.c | 259 uint64_t sector_num = offset >> BDRV_SECTOR_BITS; in cloop_co_preadv() local 271 ((sector_num + i) % s->sectors_per_block), in cloop_co_preadv() 272 block_num = (sector_num + i) / s->sectors_per_block; in cloop_co_preadv()
|
H A D | vhdx.c | 1127 static void vhdx_block_translate(BDRVVHDXState *s, int64_t sector_num, in vhdx_block_translate() argument 1132 sinfo->bat_idx = sector_num >> s->sectors_per_block_bits; in vhdx_block_translate() 1135 block_offset = sector_num - (sinfo->bat_idx << s->sectors_per_block_bits); in vhdx_block_translate() 1182 vhdx_co_readv(BlockDriverState *bs, int64_t sector_num, int nb_sectors, in vhdx_co_readv() argument 1203 vhdx_block_translate(s, sector_num, nb_sectors, &sinfo); in vhdx_co_readv() 1237 sector_num += sinfo.sectors_avail; in vhdx_co_readv() 1336 vhdx_co_writev(BlockDriverState *bs, int64_t sector_num, int nb_sectors, in vhdx_co_writev() argument 1370 vhdx_block_translate(s, sector_num, nb_sectors, &sinfo); in vhdx_co_writev() 1484 sector_num += sinfo.sectors_avail; in vhdx_co_writev() 1711 uint64_t sector_num = 0; in vhdx_create_bat() local [all …]
|
H A D | iscsi.c | 127 int64_t sector_num; member 445 static bool is_sector_request_lun_aligned(int64_t sector_num, int nb_sectors, in is_sector_request_lun_aligned() argument 449 return is_byte_request_lun_aligned(sector_num << BDRV_SECTOR_BITS, in is_sector_request_lun_aligned() 604 iscsi_co_writev(BlockDriverState *bs, int64_t sector_num, int nb_sectors, in iscsi_co_writev() argument 617 if (!is_sector_request_lun_aligned(sector_num, nb_sectors, iscsilun)) { in iscsi_co_writev() 625 lba = sector_qemu2lun(sector_num, iscsilun); in iscsi_co_writev() 677 iscsi_allocmap_set_invalid(iscsilun, sector_num * BDRV_SECTOR_SIZE, 685 iscsi_allocmap_set_allocated(iscsilun, sector_num * BDRV_SECTOR_SIZE, 800 int64_t sector_num, int nb_sectors, in iscsi_co_readv() argument 809 if (!is_sector_request_lun_aligned(sector_num, nb_sectors, iscsilun)) { in iscsi_co_readv() [all …]
|
H A D | qed.c | 1393 qed_co_request(BlockDriverState *bs, int64_t sector_num, QEMUIOVector *qiov, in qed_co_request() argument 1398 .cur_pos = (uint64_t) sector_num * BDRV_SECTOR_SIZE, in qed_co_request() 1399 .end_pos = (sector_num + nb_sectors) * BDRV_SECTOR_SIZE, in qed_co_request() 1405 trace_qed_aio_setup(bs->opaque, &acb, sector_num, nb_sectors, NULL, flags); in qed_co_request() 1412 bdrv_qed_co_readv(BlockDriverState *bs, int64_t sector_num, int nb_sectors, in bdrv_qed_co_readv() argument 1415 return qed_co_request(bs, sector_num, qiov, nb_sectors, 0); in bdrv_qed_co_readv() 1419 bdrv_qed_co_writev(BlockDriverState *bs, int64_t sector_num, int nb_sectors, in bdrv_qed_co_writev() argument 1422 return qed_co_request(bs, sector_num, qiov, nb_sectors, QED_AIOCB_WRITE); in bdrv_qed_co_writev()
|
H A D | gluster.c | 1179 int64_t sector_num, int nb_sectors, in qemu_gluster_co_rw() argument 1186 off_t offset = sector_num * BDRV_SECTOR_SIZE; in qemu_gluster_co_rw() 1221 int64_t sector_num, in qemu_gluster_co_readv() argument 1225 return qemu_gluster_co_rw(bs, sector_num, nb_sectors, qiov, 0); in qemu_gluster_co_readv() 1229 int64_t sector_num, in qemu_gluster_co_writev() argument 1234 return qemu_gluster_co_rw(bs, sector_num, nb_sectors, qiov, 1); in qemu_gluster_co_writev()
|
H A D | vmdk.c | 1751 int64_t sector_num, VmdkExtent *start_hint) in find_extent() argument 1759 if (sector_num < extent->end_sector) { in find_extent() 2960 int64_t sector_num = 0; in vmdk_co_check() local 2970 if (sector_num >= total_sectors) { in vmdk_co_check() 2973 extent = find_extent(s, sector_num, extent); in vmdk_co_check() 2977 sector_num); in vmdk_co_check() 2982 sector_num << BDRV_SECTOR_BITS, in vmdk_co_check() 2987 PRId64 "\n", sector_num); in vmdk_co_check() 2995 PRId64 "\n", sector_num); in vmdk_co_check() 3002 PRId64 " points after EOF\n", sector_num); in vmdk_co_check() [all …]
|
H A D | ssh.c | 1122 int64_t sector_num, in ssh_co_readv() argument 1129 ret = ssh_read(s, bs, sector_num * BDRV_SECTOR_SIZE, in ssh_co_readv() 1196 int64_t sector_num, in ssh_co_writev() argument 1204 ret = ssh_write(s, bs, sector_num * BDRV_SECTOR_SIZE, in ssh_co_writev()
|
/openbmc/qemu/ |
H A D | qemu-img.c | 1180 int64_t sector_num, int alignment) in is_allocated_sectors() argument 1206 tail = (sector_num + i) & (alignment - 1); in is_allocated_sectors() 1238 int min, int64_t sector_num, int alignment) in is_allocated_sectors_min() argument 1247 ret = is_allocated_sectors(buf, n, pnum, sector_num, alignment); in is_allocated_sectors_min() 1255 sector_num += *pnum; in is_allocated_sectors_min() 1259 ret = is_allocated_sectors(buf, n, pnum, sector_num, alignment); in is_allocated_sectors_min() 1263 sector_num += *pnum; in is_allocated_sectors_min() 1678 int64_t sector_num; member 1704 static void convert_select_part(ImgConvertState *s, int64_t sector_num, in convert_select_part() argument 1709 while (sector_num - *src_cur_offset >= s->src_sectors[*src_cur]) { in convert_select_part() [all …]
|
/openbmc/qemu/hw/ide/ |
H A D | core.c | 616 int64_t sector_num; in ide_get_sector() local 619 sector_num = ((int64_t)s->hob_hcyl << 40) | in ide_get_sector() 626 sector_num = ((s->select & (ATA_DEV_LBA_MSB)) << 24) | in ide_get_sector() 631 sector_num = ((s->hcyl << 8) | s->lcyl) * s->heads * s->sectors + in ide_get_sector() 635 return sector_num; in ide_get_sector() 638 void ide_set_sector(IDEState *s, int64_t sector_num) in ide_set_sector() argument 643 s->sector = sector_num; in ide_set_sector() 644 s->lcyl = sector_num >> 8; in ide_set_sector() 645 s->hcyl = sector_num >> 16; in ide_set_sector() 646 s->hob_sector = sector_num >> 24; in ide_set_sector() [all …]
|
H A D | ide-internal.h | 398 void ide_set_sector(IDEState *s, int64_t sector_num); 437 BlockAIOCB *ide_buffered_readv(IDEState *s, int64_t sector_num,
|
H A D | trace-events | 18 ide_sector_read(int64_t sector_num, int nsectors) "sector=%"PRId64" nsectors=%d" 19 ide_sector_write(int64_t sector_num, int nsectors) "sector=%"PRId64" nsectors=%d" 22 ide_dma_cb(void *s, int64_t sector_num, int n, const char *dma) "IDEState %p; sector_num=%"PRId64" …
|
/openbmc/qemu/block/export/ |
H A D | virtio-blk-handler.c | 177 int64_t sector_num = le64_to_cpu(out.sector); in virtio_blk_process_req() local 192 sector_num, qiov.size))) { in virtio_blk_process_req() 197 offset = sector_num << VIRTIO_BLK_SECTOR_BITS; in virtio_blk_process_req()
|
/openbmc/qemu/hw/block/ |
H A D | virtio-blk.c | 225 int64_t sector_num = mrb->reqs[start]->sector_num; in submit_requests() local 251 sector_num << BDRV_SECTOR_BITS, in submit_requests() 263 blk_aio_pwritev(blk, sector_num << BDRV_SECTOR_BITS, qiov, in submit_requests() 267 blk_aio_preadv(blk, sector_num << BDRV_SECTOR_BITS, qiov, in submit_requests() 282 if (req1->sector_num > req2->sector_num) { in multireq_compare() 284 } else if (req1->sector_num < req2->sector_num) { in multireq_compare() 295 int64_t sector_num = 0; in virtio_blk_submit_multireq() local 317 if (sector_num + nb_sectors != req->sector_num || in virtio_blk_submit_multireq() 328 sector_num = req->sector_num; in virtio_blk_submit_multireq() 842 req->sector_num = virtio_ldq_p(vdev, &req->out.sector); in virtio_blk_handle_request() [all …]
|
H A D | pflash_cfi02.c | 282 uint32_t sector_num = 0; in pflash_sector_info() local 288 .num = sector_num + (offset - addr) / pfl->sector_len[i], in pflash_sector_info() 291 sector_num += pfl->nb_blocs[i]; in pflash_sector_info() 303 long sector_num = pflash_sector_info(pfl, offset).num; in pflash_sector_is_erasing() local 304 return test_bit(sector_num, pfl->sector_erase_map); in pflash_sector_is_erasing()
|
/openbmc/qemu/contrib/vhost-user-blk/ |
H A D | vhost-user-blk.c | 48 int64_t sector_num; member 145 rc = preadv(vdev_blk->blk_fd, iov, iovcnt, req->sector_num * 512); in vub_readv() 148 vdev_blk->blk_name, req->sector_num, req->size, in vub_readv() 168 rc = pwritev(vdev_blk->blk_fd, iov, iovcnt, req->sector_num * 512); in vub_writev() 171 vdev_blk->blk_name, req->sector_num, req->size, in vub_writev() 277 req->sector_num = le64_to_cpu(req->out->sector); in vub_virtio_process_req()
|
/openbmc/qemu/include/hw/virtio/ |
H A D | virtio-blk.h | 81 int64_t sector_num; member
|
/openbmc/linux/drivers/mtd/ |
H A D | sm_ftl.c | 934 int sector_num; in sm_cache_flush() local 951 for_each_set_bit(sector_num, &ftl->cache_data_invalid_bitmap, in sm_cache_flush() 955 zone_num, block_num, sector_num * SM_SECTOR_SIZE, in sm_cache_flush() 956 ftl->cache_data + sector_num * SM_SECTOR_SIZE, NULL)) in sm_cache_flush() 957 clear_bit(sector_num, in sm_cache_flush()
|
/openbmc/linux/drivers/scsi/ |
H A D | 3w-xxxx.h | 390 unsigned short sector_num; member
|
/openbmc/qemu/docs/devel/testing/ |
H A D | blkverify.rst | 63 blkverify: read sector_num=0 nb_sectors=4 contents mismatch in sector 0
|
/openbmc/qemu/include/block/ |
H A D | block_int-common.h | 514 int64_t sector_num, int nb_sectors, QEMUIOVector *qiov); 541 int64_t sector_num, int nb_sectors, QEMUIOVector *qiov,
|