Home
last modified time | relevance | path

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

/external/qemu/
Dblock.c52 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
55 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
58 uint8_t *buf, int nb_sectors);
60 const uint8_t *buf, int nb_sectors);
580 int nb_sectors) in bdrv_check_request() argument
582 return bdrv_check_byte_request(bs, sector_num * 512, nb_sectors * 512); in bdrv_check_request()
587 uint8_t *buf, int nb_sectors) in bdrv_read() argument
593 if (bdrv_check_request(bs, sector_num, nb_sectors)) in bdrv_read()
596 return drv->bdrv_read(bs, sector_num, buf, nb_sectors); in bdrv_read()
606 const uint8_t *buf, int nb_sectors) in bdrv_write() argument
[all …]
Dblock_int.h55 uint8_t *buf, int nb_sectors);
57 const uint8_t *buf, int nb_sectors);
62 int nb_sectors, int *pnum);
67 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
70 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
77 const uint8_t *buf, int nb_sectors);
Dblock.h64 uint8_t *buf, int nb_sectors);
66 const uint8_t *buf, int nb_sectors);
83 QEMUIOVector *iov, int nb_sectors,
86 QEMUIOVector *iov, int nb_sectors,
100 int bdrv_is_allocated(BlockDriverState *bs, int64_t sector_num, int nb_sectors,
142 const uint8_t *buf, int nb_sectors);
Dqemu-io.c864 int nb_sectors; in alloc_f() local
878 nb_sectors = cvtnum(argv[2]); in alloc_f()
880 nb_sectors = 1; in alloc_f()
882 ret = bdrv_is_allocated(bs, offset >> 9, nb_sectors, &num); in alloc_f()
887 if (nb_sectors == 1) in alloc_f()
891 num, nb_sectors, retstr, s1); in alloc_f()
/external/qemu/hw/
Dscsi-disk.c350 uint64_t nb_sectors; in scsi_send_command() local
752 bdrv_get_geometry(s->bdrv, &nb_sectors); in scsi_send_command()
753 nb_sectors /= s->cluster_size; in scsi_send_command()
755 if (nb_sectors) { in scsi_send_command()
756 nb_sectors--; in scsi_send_command()
758 s->max_lba = nb_sectors; in scsi_send_command()
760 if (nb_sectors > UINT32_MAX) in scsi_send_command()
761 nb_sectors = UINT32_MAX; in scsi_send_command()
762 outbuf[0] = (nb_sectors >> 24) & 0xff; in scsi_send_command()
763 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/block/
Dcow.c128 int64_t sector_num, int nb_sectors, in is_changed() argument
133 if (!bitmap || nb_sectors == 0) { in is_changed()
134 *num_same = nb_sectors; in is_changed()
139 for (*num_same = 1; *num_same < nb_sectors; (*num_same)++) { in is_changed()
148 int nb_sectors, int *pnum) in cow_is_allocated() argument
151 return is_changed(s->cow_bitmap, sector_num, nb_sectors, pnum); in cow_is_allocated()
155 uint8_t *buf, int nb_sectors) in cow_read() argument
160 while (nb_sectors > 0) { in cow_read()
161 if (is_changed(s->cow_bitmap, sector_num, nb_sectors, &n)) { in cow_read()
176 nb_sectors -= n; in cow_read()
[all …]
Dqcow.c223 int nb_sectors, int enc, in encrypt_sectors() argument
232 for(i = 0; i < nb_sectors; i++) { in encrypt_sectors()
383 int nb_sectors, int *pnum) in qcow_is_allocated() argument
392 if (n > nb_sectors) in qcow_is_allocated()
393 n = nb_sectors; in qcow_is_allocated()
449 uint8_t *buf, int nb_sectors)
455 while (nb_sectors > 0) {
459 if (n > nb_sectors)
460 n = nb_sectors;
483 nb_sectors -= n;
[all …]
Dqcow2.c312 int nb_sectors, int *pnum) in qcow_is_allocated() argument
316 *pnum = nb_sectors; in qcow_is_allocated()
324 int64_t sector_num, uint8_t *buf, int nb_sectors) in qcow2_backing_read1() argument
327 if ((sector_num + nb_sectors) <= bs->total_sectors) in qcow2_backing_read1()
328 return nb_sectors; in qcow2_backing_read1()
333 memset(buf + n1 * 512, 0, 512 * (nb_sectors - n1)); in qcow2_backing_read1()
343 int nb_sectors; member
414 acb->nb_sectors -= acb->n; in qcow_aio_read_cb()
418 if (acb->nb_sectors == 0) { in qcow_aio_read_cb()
425 acb->n = acb->nb_sectors; in qcow_aio_read_cb()
[all …]
Dparallels.c44 uint32_t nb_sectors; member
96 bs->total_sectors = le32_to_cpu(ph.nb_sectors); in parallels_open()
143 uint8_t *buf, int nb_sectors) in parallels_read() argument
147 while (nb_sectors > 0) { in parallels_read()
153 nb_sectors--; in parallels_read()
Dnbd.c100 uint8_t *buf, int nb_sectors) in nbd_read() argument
109 request.len = nb_sectors * 512; in nbd_read()
130 const uint8_t *buf, int nb_sectors) in nbd_write() argument
139 request.len = nb_sectors * 512; in nbd_write()
Dvmdk.c594 int nb_sectors, int *pnum) in vmdk_is_allocated() argument
603 if (n > nb_sectors) in vmdk_is_allocated()
604 n = nb_sectors; in vmdk_is_allocated()
610 uint8_t *buf, int nb_sectors) in vmdk_read() argument
616 while (nb_sectors > 0) { in vmdk_read()
620 if (n > nb_sectors) in vmdk_read()
621 n = nb_sectors; in vmdk_read()
637 nb_sectors -= n; in vmdk_read()
645 const uint8_t *buf, int nb_sectors) in vmdk_write() argument
661 while (nb_sectors > 0) { in vmdk_write()
[all …]
Draw-posix.c378 uint8_t *buf, int nb_sectors) in raw_read() argument
382 ret = raw_pread(bs, sector_num * 512, buf, nb_sectors * 512); in raw_read()
383 if (ret == (nb_sectors * 512)) in raw_read()
467 const uint8_t *buf, int nb_sectors) in raw_write() argument
470 ret = raw_pwrite(bs, sector_num * 512, buf, nb_sectors * 512); in raw_write()
471 if (ret == (nb_sectors * 512)) in raw_write()
648 QEMUIOVector *qiov, int nb_sectors, in raw_aio_setup() argument
664 acb->aiocb.aio_nbytes = nb_sectors * 512; in raw_aio_setup()
682 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, in raw_aio_readv() argument
687 acb = raw_aio_setup(bs, sector_num, qiov, nb_sectors, cb, opaque); in raw_aio_readv()
[all …]
Dvpc.c377 uint8_t *buf, int nb_sectors) in vpc_read() argument
383 while (nb_sectors > 0) { in vpc_read()
394 nb_sectors--; in vpc_read()
402 const uint8_t *buf, int nb_sectors) in vpc_write() argument
408 while (nb_sectors > 0) { in vpc_write()
421 nb_sectors--; in vpc_write()
Dbochs.c217 uint8_t *buf, int nb_sectors) in bochs_read() argument
222 while (nb_sectors > 0) { in bochs_read()
231 nb_sectors--; in bochs_read()
Draw-win32.c113 uint8_t *buf, int nb_sectors) in raw_read() argument
120 int count = nb_sectors * 512; in raw_read()
134 const uint8_t *buf, int nb_sectors) in raw_write() argument
141 int count = nb_sectors * 512; in raw_write()
Dqcow2-cluster.c288 int nb_sectors, int enc, in qcow2_encrypt_sectors() argument
297 for(i = 0; i < nb_sectors; i++) { in qcow2_encrypt_sectors()
310 uint8_t *buf, int nb_sectors) in qcow_read() argument
316 while (nb_sectors > 0) { in qcow_read()
317 n = nb_sectors; in qcow_read()
345 nb_sectors -= n; in qcow_read()
Dcloop.c131 uint8_t *buf, int nb_sectors) in cloop_read() argument
136 for(i=0;i<nb_sectors;i++) { in cloop_read()
Dqcow2.h152 int64_t sector_num, uint8_t *buf, int nb_sectors);
178 int nb_sectors, int enc,
Dvvfat.c1284 uint8_t *buf, int nb_sectors) in vvfat_read() argument
1289 for(i=0;i<nb_sectors;i++,sector_num++) { in vvfat_read()
1295 sector_num, nb_sectors-i, &n)) { in vvfat_read()
2649 const uint8_t *buf, int nb_sectors) in vvfat_write() argument
2668 i <= sector2cluster(s, sector_num + nb_sectors - 1);) { in vvfat_write()
2688 if (end > sector_num + nb_sectors) in vvfat_write()
2689 end = sector_num + nb_sectors; in vvfat_write()
2720 DLOG(fprintf(stderr, "Write to qcow backend: %d + %d\n", (int)sector_num, nb_sectors)); in vvfat_write()
2721 ret = s->qcow->drv->bdrv_write(s->qcow, sector_num, buf, nb_sectors); in vvfat_write()
2728 i <= sector2cluster(s, sector_num + nb_sectors - 1); i++) in vvfat_write()
[all …]
Ddmg.c256 uint8_t *buf, int nb_sectors) in dmg_read() argument
261 for(i=0;i<nb_sectors;i++) { in dmg_read()