Home
last modified time | relevance | path

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

/external/qemu/block/
Dcow.c134 int nb_sectors, int *num_same) in cow_is_allocated() argument
138 if (nb_sectors == 0) { in cow_is_allocated()
139 *num_same = nb_sectors; in cow_is_allocated()
148 for (*num_same = 1; *num_same < nb_sectors; (*num_same)++) { in cow_is_allocated()
157 int nb_sectors) in cow_update_bitmap() argument
162 for (i = 0; i < nb_sectors; i++) { in cow_update_bitmap()
173 uint8_t *buf, int nb_sectors) in cow_read() argument
178 while (nb_sectors > 0) { in cow_read()
179 if (cow_is_allocated(bs, sector_num, nb_sectors, &n)) { in cow_read()
195 nb_sectors -= n; in cow_read()
[all …]
Draw.c36 const uint8_t *buf, int nb_sectors) in check_write_unsafe() argument
44 if (sector_num == 0 && nb_sectors > 0) { in check_write_unsafe()
52 uint8_t *buf, int nb_sectors) in raw_read() argument
54 return bdrv_read(bs->file, sector_num, buf, nb_sectors); in raw_read()
70 const uint8_t *buf, int nb_sectors) in raw_write() argument
72 if (check_write_unsafe(bs, sector_num, buf, nb_sectors)) { in raw_write()
80 ret = bdrv_write(bs->file, 1, buf + 512, nb_sectors - 1); in raw_write()
88 return bdrv_write(bs->file, sector_num, buf, nb_sectors); in raw_write()
92 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, in raw_aio_readv() argument
95 return bdrv_aio_readv(bs->file, sector_num, qiov, nb_sectors, cb, opaque); in raw_aio_readv()
[all …]
Dqcow.c219 int nb_sectors, int enc, in encrypt_sectors() argument
228 for(i = 0; i < nb_sectors; i++) { in encrypt_sectors()
380 int nb_sectors, int *pnum) in qcow_is_allocated() argument
389 if (n > nb_sectors) in qcow_is_allocated()
390 n = nb_sectors; in qcow_is_allocated()
447 uint8_t *buf, int nb_sectors)
453 while (nb_sectors > 0) {
457 if (n > nb_sectors)
458 n = nb_sectors;
481 nb_sectors -= n;
[all …]
Dparallels.c44 uint32_t nb_sectors; member
86 bs->total_sectors = le32_to_cpu(ph.nb_sectors); in parallels_open()
120 uint8_t *buf, int nb_sectors) in parallels_read() argument
122 while (nb_sectors > 0) { in parallels_read()
130 nb_sectors--; in parallels_read()
Dvpc.c373 uint8_t *buf, int nb_sectors) in vpc_read() argument
380 while (nb_sectors > 0) { in vpc_read()
385 if (sectors > nb_sectors) { in vpc_read()
386 sectors = nb_sectors; in vpc_read()
399 nb_sectors -= sectors; in vpc_read()
407 const uint8_t *buf, int nb_sectors) in vpc_write() argument
414 while (nb_sectors > 0) { in vpc_write()
419 if (sectors > nb_sectors) { in vpc_write()
420 sectors = nb_sectors; in vpc_write()
434 nb_sectors -= sectors; in vpc_write()
Dnbd.c97 uint8_t *buf, int nb_sectors) in nbd_read() argument
106 request.len = nb_sectors * 512; in nbd_read()
127 const uint8_t *buf, int nb_sectors) in nbd_write() argument
136 request.len = nb_sectors * 512; in nbd_write()
Dvmdk.c571 int nb_sectors, int *pnum) in vmdk_is_allocated() argument
580 if (n > nb_sectors) in vmdk_is_allocated()
581 n = nb_sectors; in vmdk_is_allocated()
587 uint8_t *buf, int nb_sectors) in vmdk_read() argument
593 while (nb_sectors > 0) { in vmdk_read()
597 if (n > nb_sectors) in vmdk_read()
598 n = nb_sectors; in vmdk_read()
614 nb_sectors -= n; in vmdk_read()
622 const uint8_t *buf, int nb_sectors) in vmdk_write() argument
638 while (nb_sectors > 0) { in vmdk_write()
[all …]
Dqcow2.c297 int nb_sectors, int *pnum) in qcow_is_allocated() argument
302 *pnum = nb_sectors; in qcow_is_allocated()
315 int64_t sector_num, uint8_t *buf, int nb_sectors) in qcow2_backing_read1() argument
318 if ((sector_num + nb_sectors) <= bs->total_sectors) in qcow2_backing_read1()
319 return nb_sectors; in qcow2_backing_read1()
324 memset(buf + n1 * 512, 0, 512 * (nb_sectors - n1)); in qcow2_backing_read1()
493 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, in qcow_aio_setup() argument
511 acb->remaining_sectors = nb_sectors; in qcow_aio_setup()
520 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, in qcow_aio_readv() argument
525 acb = qcow_aio_setup(bs, sector_num, qiov, nb_sectors, cb, opaque, 0); in qcow_aio_readv()
[all …]
Draw-posix-aio.h31 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
40 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
Draw-posix.c386 uint8_t *buf, int nb_sectors) in raw_read() argument
391 nb_sectors * BDRV_SECTOR_SIZE); in raw_read()
392 if (ret == (nb_sectors * BDRV_SECTOR_SIZE)) in raw_read()
476 const uint8_t *buf, int nb_sectors) in raw_write() argument
480 nb_sectors * BDRV_SECTOR_SIZE); in raw_write()
481 if (ret == (nb_sectors * BDRV_SECTOR_SIZE)) in raw_write()
503 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, in raw_aio_submit() argument
522 nb_sectors, cb, opaque, type); in raw_aio_submit()
527 return paio_submit(bs, s->fd, sector_num, qiov, nb_sectors, in raw_aio_submit()
532 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, in raw_aio_readv() argument
[all …]
Dbochs.c190 uint8_t *buf, int nb_sectors) in bochs_read() argument
194 while (nb_sectors > 0) { in bochs_read()
203 nb_sectors--; in bochs_read()
Draw-win32.c109 uint8_t *buf, int nb_sectors) in raw_read() argument
116 int count = nb_sectors * 512; in raw_read()
130 const uint8_t *buf, int nb_sectors) in raw_write() argument
137 int count = nb_sectors * 512; in raw_write()
Dcloop.c132 uint8_t *buf, int nb_sectors) in cloop_read() argument
137 for(i=0;i<nb_sectors;i++) { in cloop_read()
Dqcow2-cluster.c324 int nb_sectors, int enc, in qcow2_encrypt_sectors() argument
333 for(i = 0; i < nb_sectors; i++) { in qcow2_encrypt_sectors()
346 uint8_t *buf, int nb_sectors) in qcow_read() argument
352 while (nb_sectors > 0) { in qcow_read()
353 n = nb_sectors; in qcow_read()
389 nb_sectors -= n; in qcow_read()
Dqcow2.h170 int64_t sector_num, uint8_t *buf, int nb_sectors);
196 int nb_sectors, int enc,
Ddmg.c268 uint8_t *buf, int nb_sectors) in dmg_read() argument
273 for(i=0;i<nb_sectors;i++) { in dmg_read()
Dvvfat.c1289 uint8_t *buf, int nb_sectors) in vvfat_read() argument
1294 for(i=0;i<nb_sectors;i++,sector_num++) { in vvfat_read()
1300 sector_num, nb_sectors-i, &n)) { in vvfat_read()
2661 const uint8_t *buf, int nb_sectors) in vvfat_write() argument
2680 i <= sector2cluster(s, sector_num + nb_sectors - 1);) { in vvfat_write()
2700 if (end > sector_num + nb_sectors) in vvfat_write()
2701 end = sector_num + nb_sectors; in vvfat_write()
2732 DLOG(fprintf(stderr, "Write to qcow backend: %d + %d\n", (int)sector_num, nb_sectors)); in vvfat_write()
2733 ret = s->qcow->drv->bdrv_write(s->qcow, sector_num, buf, nb_sectors); in vvfat_write()
2740 i <= sector2cluster(s, sector_num + nb_sectors - 1); i++) in vvfat_write()
[all …]
/external/qemu/hw/
Dscsi-disk.c351 uint64_t nb_sectors; in scsi_send_command() local
753 bdrv_get_geometry(s->bdrv, &nb_sectors); in scsi_send_command()
754 nb_sectors /= s->cluster_size; in scsi_send_command()
756 if (nb_sectors) { in scsi_send_command()
757 nb_sectors--; in scsi_send_command()
759 s->max_lba = nb_sectors; in scsi_send_command()
761 if (nb_sectors > UINT32_MAX) in scsi_send_command()
762 nb_sectors = UINT32_MAX; in scsi_send_command()
763 outbuf[0] = (nb_sectors >> 24) & 0xff; in scsi_send_command()
764 outbuf[1] = (nb_sectors >> 16) & 0xff; in scsi_send_command()
[all …]
Dcdrom.c41 int cdrom_read_toc(int nb_sectors, uint8_t *buf, int msf, int start_track) in cdrom_read_toc() argument
73 lba_to_msf(q, nb_sectors); in cdrom_read_toc()
76 cpu_to_be32wu((uint32_t *)q, nb_sectors); in cdrom_read_toc()
85 int cdrom_read_toc_raw(int nb_sectors, uint8_t *buf, int msf, int session_num) in cdrom_read_toc_raw() argument
127 lba_to_msf(q, nb_sectors); in cdrom_read_toc_raw()
130 cpu_to_be32wu((uint32_t *)q, nb_sectors); in cdrom_read_toc_raw()
Dscsi-disk.h33 int cdrom_read_toc(int nb_sectors, uint8_t *buf, int msf, int start_track);
34 int cdrom_read_toc_raw(int nb_sectors, uint8_t *buf, int msf, int session_num);
/external/qemu/
Dblock.c46 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
49 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
56 uint8_t *buf, int nb_sectors);
58 const uint8_t *buf, int nb_sectors);
897 int nb_sectors) in bdrv_check_request() argument
900 nb_sectors * BDRV_SECTOR_SIZE); in bdrv_check_request()
905 uint8_t *buf, int nb_sectors) in bdrv_read() argument
911 if (bdrv_check_request(bs, sector_num, nb_sectors)) in bdrv_read()
914 return drv->bdrv_read(bs, sector_num, buf, nb_sectors); in bdrv_read()
918 int nb_sectors, int dirty) in set_dirty_bitmap() argument
[all …]
Dblock_int.h57 uint8_t *buf, int nb_sectors);
59 const uint8_t *buf, int nb_sectors);
64 int nb_sectors, int *pnum);
69 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
72 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
87 const uint8_t *buf, int nb_sectors);
Dblock.h78 uint8_t *buf, int nb_sectors);
80 const uint8_t *buf, int nb_sectors);
88 const uint8_t *buf, int nb_sectors);
114 QEMUIOVector *iov, int nb_sectors,
117 QEMUIOVector *iov, int nb_sectors,
126 int nb_sectors; member
150 int bdrv_is_allocated(BlockDriverState *bs, int64_t sector_num, int nb_sectors,
198 const uint8_t *buf, int nb_sectors);
Dqemu-io.c971 reqs[i].nb_sectors = reqs[i].qiov->size >> 9; in multiwrite_f()
1490 int nb_sectors, remaining; in alloc_f() local
1503 nb_sectors = cvtnum(argv[2]); in alloc_f()
1505 nb_sectors = 1; in alloc_f()
1507 remaining = nb_sectors; in alloc_f()
1510 ret = bdrv_is_allocated(bs, offset >> 9, nb_sectors, &num); in alloc_f()
1519 if (nb_sectors == 1) in alloc_f()
1523 sum_alloc, nb_sectors, s1); in alloc_f()
1541 int64_t nb_sectors; in map_f() local
1548 nb_sectors = bs->total_sectors; in map_f()
[all …]
Dposix-aio-compat.c569 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, in paio_submit() argument
586 acb->aio_nbytes = nb_sectors * 512; in paio_submit()