Home
last modified time | relevance | path

Searched refs:sector_num (Results 1 – 25 of 37) sorted by relevance

12

/illumos-kvm-cmd/block/
H A Draw.c12 static int raw_read(BlockDriverState *bs, int64_t sector_num, in raw_read() argument
15 return bdrv_read(bs->file, sector_num, buf, nb_sectors); in raw_read()
18 static int raw_write(BlockDriverState *bs, int64_t sector_num, in raw_write() argument
21 return bdrv_write(bs->file, sector_num, buf, nb_sectors); in raw_write()
25 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, in raw_aio_readv() argument
28 return bdrv_aio_readv(bs->file, sector_num, qiov, nb_sectors, cb, opaque); in raw_aio_readv()
32 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, in raw_aio_writev() argument
35 return bdrv_aio_writev(bs->file, sector_num, qiov, nb_sectors, cb, opaque); in raw_aio_writev()
68 static int raw_discard(BlockDriverState *bs, int64_t sector_num, int nb_sectors) in raw_discard() argument
70 return bdrv_discard(bs->file, sector_num, nb_sectors); in raw_discard()
H A Dcow.c133 static int cow_is_allocated(BlockDriverState *bs, int64_t sector_num, in cow_is_allocated() argument
143 changed = is_bit_set(bs, sector_num); in cow_is_allocated()
149 if (is_bit_set(bs, sector_num + *num_same) != changed) in cow_is_allocated()
163 error = cow_set_bit(bs, sector_num + i); in cow_update_bitmap()
172 static int cow_read(BlockDriverState *bs, int64_t sector_num, in cow_read() argument
179 if (cow_is_allocated(bs, sector_num, nb_sectors, &n)) { in cow_read()
181 s->cow_sectors_offset + sector_num * 512, in cow_read()
188 ret = bdrv_read(bs->backing_hd, sector_num, buf, n); in cow_read()
196 sector_num += n; in cow_read()
202 static int cow_write(BlockDriverState *bs, int64_t sector_num, in cow_write() argument
[all …]
H A Dblkverify.c25 int64_t sector_num; member
63 acb->is_write ? "write" : "read", acb->sector_num, in blkverify_err()
248 acb->sector_num = sector_num; in blkverify_aio_get()
309 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, in blkverify_aio_readv() argument
313 BlkverifyAIOCB *acb = blkverify_aio_get(bs, false, sector_num, qiov, in blkverify_aio_readv()
321 if (!bdrv_aio_readv(s->test_file, sector_num, qiov, nb_sectors, in blkverify_aio_readv()
325 if (!bdrv_aio_readv(bs->file, sector_num, &acb->raw_qiov, nb_sectors, in blkverify_aio_readv()
333 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, in blkverify_aio_writev() argument
337 BlkverifyAIOCB *acb = blkverify_aio_get(bs, true, sector_num, qiov, in blkverify_aio_writev()
340 if (!bdrv_aio_writev(s->test_file, sector_num, qiov, nb_sectors, in blkverify_aio_writev()
[all …]
H A Dqcow.c228 ivec.ll[0] = cpu_to_le64(sector_num); in encrypt_sectors()
232 sector_num++; in encrypt_sectors()
386 index_in_cluster = sector_num & (s->cluster_sectors - 1); in qcow_is_allocated()
445 static int qcow_read(BlockDriverState *bs, int64_t sector_num,
476 encrypt_sectors(s, sector_num, buf, buf, n, 0,
481 sector_num += n;
490 int64_t sector_num; member
526 acb->sector_num = sector_num; in qcow_aio_setup()
567 acb->sector_num += acb->n; in qcow_aio_read_cb()
661 acb->sector_num += acb->n; in qcow_aio_write_cb()
[all …]
H A Ddmg.c186 uint32_t chunk_num,int sector_num) in is_sector_in_chunk() argument
188 if(chunk_num>=s->n_chunks || s->sectors[chunk_num]>sector_num || in is_sector_in_chunk()
189 s->sectors[chunk_num]+s->sectorcounts[chunk_num]<=sector_num) in is_sector_in_chunk()
195 static inline uint32_t search_chunk(BDRVDMGState* s,int sector_num) in search_chunk() argument
201 if(s->sectors[chunk3]>sector_num) in search_chunk()
203 else if(s->sectors[chunk3]+s->sectorcounts[chunk3]>sector_num) in search_chunk()
215 if(!is_sector_in_chunk(s,s->current_chunk,sector_num)) { in dmg_read_chunk()
217 uint32_t chunk = search_chunk(s,sector_num); in dmg_read_chunk()
267 static int dmg_read(BlockDriverState *bs, int64_t sector_num, in dmg_read() argument
275 if(dmg_read_chunk(bs, sector_num+i) != 0) in dmg_read()
[all …]
H A Dvpc.c236 int64_t sector_num, int write) in get_sector_offset() argument
239 uint64_t offset = sector_num * 512; in get_sector_offset()
335 if ((sector_num < 0) || (sector_num > bs->total_sectors)) in alloc_block()
339 index = (sector_num * 512) / s->block_size; in alloc_block()
363 return get_sector_offset(bs, sector_num, 0); in alloc_block()
370 static int vpc_read(BlockDriverState *bs, int64_t sector_num, in vpc_read() argument
379 offset = get_sector_offset(bs, sector_num, 0); in vpc_read()
398 sector_num += sectors; in vpc_read()
413 offset = get_sector_offset(bs, sector_num, 1); in vpc_write()
422 offset = alloc_block(bs, sector_num); in vpc_write()
[all …]
H A Dparallels.c105 static int64_t seek_to_sector(BlockDriverState *bs, int64_t sector_num) in seek_to_sector() argument
110 index = sector_num / s->tracks; in seek_to_sector()
111 offset = sector_num % s->tracks; in seek_to_sector()
119 static int parallels_read(BlockDriverState *bs, int64_t sector_num, in parallels_read() argument
123 int64_t position = seek_to_sector(bs, sector_num); in parallels_read()
131 sector_num++; in parallels_read()
H A Dqcow2.c357 int64_t sector_num, int nb_sectors) in qcow2_backing_read1() argument
360 if ((sector_num + nb_sectors) <= bs->total_sectors) in qcow2_backing_read1()
362 if (sector_num >= bs->total_sectors) in qcow2_backing_read1()
365 n1 = bs->total_sectors - sector_num; in qcow2_backing_read1()
374 int64_t sector_num; member
453 acb->sector_num += acb->cur_nr_sectors; in qcow2_aio_read_cb()
469 ret = qcow2_get_cluster_offset(bs, acb->sector_num << 9, in qcow2_aio_read_cb()
486 acb->sector_num, acb->cur_nr_sectors); in qcow2_aio_read_cb()
573 acb->sector_num = sector_num; in qcow2_aio_setup()
644 acb->sector_num += acb->cur_nr_sectors; in qcow2_aio_write_cb()
[all …]
H A Dvdi.c141 int64_t sector_num; member
464 size_t bmap_index = sector_num / s->block_sectors; in vdi_is_allocated()
504 acb->sector_num = sector_num; in vdi_aio_setup()
580 acb->sector_num += acb->n_sectors; in vdi_aio_read_cb()
583 block_index = acb->sector_num / s->block_sectors; in vdi_aio_read_cb()
584 sector_in_block = acb->sector_num % s->block_sectors; in vdi_aio_read_cb()
591 n_sectors, acb->sector_num); in vdi_aio_read_cb()
657 acb->sector_num += acb->n_sectors; in vdi_aio_write_cb()
715 block_index = acb->sector_num / s->block_sectors; in vdi_aio_write_cb()
716 sector_in_block = acb->sector_num % s->block_sectors; in vdi_aio_write_cb()
[all …]
H A Dbochs.c158 static int64_t seek_to_sector(BlockDriverState *bs, int64_t sector_num) in seek_to_sector() argument
161 int64_t offset = sector_num * 512; in seek_to_sector()
189 static int bochs_read(BlockDriverState *bs, int64_t sector_num, in bochs_read() argument
195 int64_t block_offset = seek_to_sector(bs, sector_num); in bochs_read()
204 sector_num++; in bochs_read()
H A Dvmdk.c569 static int vmdk_is_allocated(BlockDriverState *bs, int64_t sector_num, in vmdk_is_allocated() argument
577 index_in_cluster = sector_num % s->cluster_sectors; in vmdk_is_allocated()
585 static int vmdk_read(BlockDriverState *bs, int64_t sector_num, in vmdk_read() argument
594 index_in_cluster = sector_num % s->cluster_sectors; in vmdk_read()
603 ret = bdrv_read(bs->backing_hd, sector_num, buf, n); in vmdk_read()
614 sector_num += n; in vmdk_read()
620 static int vmdk_write(BlockDriverState *bs, int64_t sector_num, in vmdk_write() argument
629 if (sector_num > bs->total_sectors) { in vmdk_write()
633 sector_num, bs->total_sectors); in vmdk_write()
638 index_in_cluster = sector_num & (s->cluster_sectors - 1); in vmdk_write()
[all …]
H A Dnbd.c124 static int nbd_read(BlockDriverState *bs, int64_t sector_num, in nbd_read() argument
133 request.from = sector_num * 512;; in nbd_read()
154 static int nbd_write(BlockDriverState *bs, int64_t sector_num, in nbd_write() argument
163 request.from = sector_num * 512;; in nbd_write()
H A Draw-posix.c419 static int raw_read(BlockDriverState *bs, int64_t sector_num, in raw_read() argument
424 ret = raw_pread(bs, sector_num * BDRV_SECTOR_SIZE, buf, in raw_read()
514 static int raw_write(BlockDriverState *bs, int64_t sector_num, in raw_write() argument
518 ret = raw_pwrite(bs, sector_num * BDRV_SECTOR_SIZE, buf, in raw_write()
542 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, in raw_aio_submit() argument
566 return paio_submit(bs, s->fd, sector_num, qiov, nb_sectors, in raw_aio_submit()
571 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, in raw_aio_readv() argument
574 return raw_aio_submit(bs, sector_num, qiov, nb_sectors, in raw_aio_readv()
582 return raw_aio_submit(bs, sector_num, qiov, nb_sectors, in raw_aio_writev()
775 fl.l_start = sector_num << 9; in xfs_discard()
[all …]
H A Dvvfat.c1296 if (sector_num >= s->sector_count) in vvfat_read()
1301 sector_num, nb_sectors-i, &n)) { in vvfat_read()
1306 sector_num += n - 1; in vvfat_read()
1311 if(sector_num<s->faked_sectors) { in vvfat_read()
1312 if(sector_num<s->first_sectors_number) in vvfat_read()
2684 for (i = sector2cluster(s, sector_num); in vvfat_write()
2703 if (begin < sector_num) in vvfat_write()
2704 begin = sector_num; in vvfat_write()
2705 if (end > sector_num + nb_sectors) in vvfat_write()
2706 end = sector_num + nb_sectors; in vvfat_write()
[all …]
H A Draw-posix-aio.h31 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
40 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
H A Dqcow2-cluster.c270 void qcow2_encrypt_sectors(BDRVQcowState *s, int64_t sector_num, in qcow2_encrypt_sectors() argument
282 ivec.ll[0] = cpu_to_le64(sector_num); in qcow2_encrypt_sectors()
286 sector_num++; in qcow2_encrypt_sectors()
293 static int qcow2_read(BlockDriverState *bs, int64_t sector_num, in qcow2_read() argument
305 ret = qcow2_get_cluster_offset(bs, sector_num << 9, &n, in qcow2_read()
311 index_in_cluster = sector_num & (s->cluster_sectors - 1); in qcow2_read()
319 n1 = qcow2_backing_read1(bs->backing_hd, &qiov, sector_num, n); in qcow2_read()
322 ret = bdrv_read(bs->backing_hd, sector_num, buf, n1); in qcow2_read()
339 qcow2_encrypt_sectors(s, sector_num, buf, buf, n, 0, in qcow2_read()
344 sector_num += n; in qcow2_read()
H A Dcloop.c131 static int cloop_read(BlockDriverState *bs, int64_t sector_num, in cloop_read() argument
138 uint32_t sector_offset_in_block=((sector_num+i)%s->sectors_per_block), in cloop_read()
139 block_num=(sector_num+i)/s->sectors_per_block; in cloop_read()
H A Dblkdebug.c357 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, in blkdebug_aio_readv() argument
367 bdrv_aio_readv(bs->file, sector_num, qiov, nb_sectors, cb, opaque); in blkdebug_aio_readv()
372 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, in blkdebug_aio_writev() argument
382 bdrv_aio_writev(bs->file, sector_num, qiov, nb_sectors, cb, opaque); in blkdebug_aio_writev()
/illumos-kvm-cmd/
H A Dblock.c1004 int64_t sector_num; in bdrv_pread() local
1012 sector_num = offset >> BDRV_SECTOR_BITS; in bdrv_pread()
1020 sector_num++; in bdrv_pread()
1029 sector_num += nb_sectors; in bdrv_pread()
1049 int64_t sector_num; in bdrv_pwrite() local
1057 sector_num = offset >> BDRV_SECTOR_BITS; in bdrv_pwrite()
1067 sector_num++; in bdrv_pwrite()
1076 sector_num += nb_sectors; in bdrv_pwrite()
1563 n = bs->total_sectors - sector_num; in bdrv_is_allocated()
2079 int64_t sector_num; member
[all …]
H A Ddma-helpers.c44 uint64_t sector_num; member
89 dbs->sector_num += dbs->iov.size / 512; in dma_bdrv_cb()
120 dbs->acb = bdrv_aio_writev(dbs->bs, dbs->sector_num, &dbs->iov, in dma_bdrv_cb()
123 dbs->acb = bdrv_aio_readv(dbs->bs, dbs->sector_num, &dbs->iov, in dma_bdrv_cb()
148 BlockDriverState *bs, QEMUSGList *sg, uint64_t sector_num, in dma_bdrv_io() argument
157 dbs->sector_num = sector_num; in dma_bdrv_io()
H A Dblock_int.h56 int (*bdrv_read)(BlockDriverState *bs, int64_t sector_num,
58 int (*bdrv_write)(BlockDriverState *bs, int64_t sector_num,
63 int (*bdrv_is_allocated)(BlockDriverState *bs, int64_t sector_num,
69 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
72 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
76 int (*bdrv_discard)(BlockDriverState *bs, int64_t sector_num,
88 int (*bdrv_write_compressed)(BlockDriverState *bs, int64_t sector_num,
H A Dblock.h78 int bdrv_read(BlockDriverState *bs, int64_t sector_num,
80 int bdrv_write(BlockDriverState *bs, int64_t sector_num,
88 int bdrv_write_sync(BlockDriverState *bs, int64_t sector_num,
113 int sector_num); typedef
114 BlockDriverAIOCB *bdrv_aio_readv(BlockDriverState *bs, int64_t sector_num,
117 BlockDriverAIOCB *bdrv_aio_writev(BlockDriverState *bs, int64_t sector_num,
150 int bdrv_discard(BlockDriverState *bs, int64_t sector_num, int nb_sectors);
152 int bdrv_is_allocated(BlockDriverState *bs, int64_t sector_num, int nb_sectors,
200 int bdrv_write_compressed(BlockDriverState *bs, int64_t sector_num,
H A Dqemu-img.c775 sector_num = 0; in img_convert()
781 nb_sectors = total_sectors - sector_num; in img_convert()
789 bs_num = sector_num - bs_offset; in img_convert()
830 sector_num); in img_convert()
834 sector_num += n; in img_convert()
843 nb_sectors = total_sectors - sector_num; in img_convert()
853 while (sector_num - bs_offset >= bs_sectors) { in img_convert()
863 if (n > bs_offset + bs_sectors - sector_num) { in img_convert()
864 n = bs_offset + bs_sectors - sector_num; in img_convert()
875 sector_num += n1; in img_convert()
[all …]
/illumos-kvm-cmd/hw/ide/
H A Dmacio.c106 int64_t sector_num; in pmac_ide_transfer_cb() local
116 sector_num = ide_get_sector(s); in pmac_ide_transfer_cb()
121 sector_num += n; in pmac_ide_transfer_cb()
122 ide_set_sector(s, sector_num); in pmac_ide_transfer_cb()
150 m->aiocb = dma_bdrv_read(s->bs, &s->sg, sector_num, in pmac_ide_transfer_cb()
153 m->aiocb = dma_bdrv_write(s->bs, &s->sg, sector_num, in pmac_ide_transfer_cb()
H A Dcore.c347 int64_t sector_num; in ide_get_sector() local
364 return sector_num; in ide_get_sector()
377 s->sector = sector_num; in ide_set_sector()
378 s->lcyl = sector_num >> 8; in ide_set_sector()
379 s->hcyl = sector_num >> 16; in ide_set_sector()
401 int64_t sector_num; in ide_sector_read() local
406 sector_num = ide_get_sector(s); in ide_sector_read()
486 int64_t sector_num; in ide_dma_cb() local
500 sector_num = ide_get_sector(s); in ide_dma_cb()
503 sector_num += n; in ide_dma_cb()
[all …]

Completed in 190 milliseconds

12