Home
last modified time | relevance | path

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

/external/qemu/block/
Draw.c35 static int check_write_unsafe(BlockDriverState *bs, int64_t sector_num, in check_write_unsafe() argument
44 if (sector_num == 0 && nb_sectors > 0) { in check_write_unsafe()
51 static int raw_read(BlockDriverState *bs, int64_t sector_num, in raw_read() argument
54 return bdrv_read(bs->file, sector_num, buf, nb_sectors); in raw_read()
69 static int raw_write(BlockDriverState *bs, int64_t sector_num, in raw_write() argument
72 if (check_write_unsafe(bs, sector_num, buf, nb_sectors)) { 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()
120 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, in raw_aio_writev() argument
[all …]
Dqcow2.c296 static int qcow_is_allocated(BlockDriverState *bs, int64_t sector_num, in qcow_is_allocated() argument
305 ret = qcow2_get_cluster_offset(bs, sector_num << 9, pnum, &cluster_offset); 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()
320 if (sector_num >= bs->total_sectors) in qcow2_backing_read1()
323 n1 = bs->total_sectors - sector_num; in qcow2_backing_read1()
330 int64_t sector_num; member
400 qcow2_encrypt_sectors(s, acb->sector_num, acb->buf, acb->buf, in qcow_aio_read_cb()
407 acb->sector_num += acb->cur_nr_sectors; in qcow_aio_read_cb()
418 ret = qcow2_get_cluster_offset(bs, acb->sector_num << 9, in qcow_aio_read_cb()
[all …]
Draw-posix-aio.h31 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
40 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
Dqcow2-cluster.c322 void qcow2_encrypt_sectors(BDRVQcowState *s, int64_t sector_num, in qcow2_encrypt_sectors() argument
334 ivec.ll[0] = cpu_to_le64(sector_num); in qcow2_encrypt_sectors()
338 sector_num++; in qcow2_encrypt_sectors()
345 static int qcow_read(BlockDriverState *bs, int64_t sector_num, in qcow_read() argument
355 ret = qcow2_get_cluster_offset(bs, sector_num << 9, &n, in qcow_read()
361 index_in_cluster = sector_num & (s->cluster_sectors - 1); in qcow_read()
365 n1 = qcow2_backing_read1(bs->backing_hd, sector_num, buf, n); in qcow_read()
368 ret = bdrv_read(bs->backing_hd, sector_num, buf, n1); in qcow_read()
385 qcow2_encrypt_sectors(s, sector_num, buf, buf, n, 0, in qcow_read()
390 sector_num += n; in qcow_read()
Draw-posix.c385 static int raw_read(BlockDriverState *bs, int64_t sector_num, in raw_read() argument
390 ret = raw_pread(bs, sector_num * BDRV_SECTOR_SIZE, buf, in raw_read()
475 static int raw_write(BlockDriverState *bs, int64_t sector_num, in raw_write() argument
479 ret = raw_pwrite(bs, sector_num * BDRV_SECTOR_SIZE, buf, in raw_write()
503 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, in raw_aio_submit() argument
521 return laio_submit(bs, s->aio_ctx, s->fd, sector_num, qiov, 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
535 return raw_aio_submit(bs, sector_num, qiov, nb_sectors, in raw_aio_readv()
540 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, in raw_aio_writev() argument
[all …]
Draw-win32.c108 static int raw_read(BlockDriverState *bs, int64_t sector_num, in raw_read() argument
115 int64_t offset = sector_num * 512; in raw_read()
129 static int raw_write(BlockDriverState *bs, int64_t sector_num, in raw_write() argument
136 int64_t offset = sector_num * 512; in raw_write()
Dqcow2.h170 int64_t sector_num, uint8_t *buf, int nb_sectors);
194 void qcow2_encrypt_sectors(BDRVQcowState *s, int64_t sector_num,
/external/qemu/
Dblock.c48 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
51 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
57 static int bdrv_read_em(BlockDriverState *bs, int64_t sector_num,
59 static int bdrv_write_em(BlockDriverState *bs, int64_t sector_num,
898 static int bdrv_check_request(BlockDriverState *bs, int64_t sector_num, in bdrv_check_request() argument
901 return bdrv_check_byte_request(bs, sector_num * BDRV_SECTOR_SIZE, in bdrv_check_request()
906 int bdrv_read(BlockDriverState *bs, int64_t sector_num, in bdrv_read() argument
913 if (bdrv_check_request(bs, sector_num, nb_sectors)) in bdrv_read()
916 return drv->bdrv_read(bs, sector_num, buf, nb_sectors); in bdrv_read()
919 static void set_dirty_bitmap(BlockDriverState *bs, int64_t sector_num, in set_dirty_bitmap() argument
[all …]
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()
Dposix-aio-compat.c569 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, in paio_submit() argument
587 acb->aio_offset = sector_num * 512; in paio_submit()
/external/qemu/include/block/
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,
86 int (*bdrv_write_compressed)(BlockDriverState *bs, int64_t sector_num,
Dblock.h77 int bdrv_read(BlockDriverState *bs, int64_t sector_num,
79 int bdrv_write(BlockDriverState *bs, int64_t sector_num,
87 int bdrv_write_sync(BlockDriverState *bs, int64_t sector_num,
112 int sector_num);
113 BlockDriverAIOCB *bdrv_aio_readv(BlockDriverState *bs, int64_t sector_num,
116 BlockDriverAIOCB *bdrv_aio_writev(BlockDriverState *bs, int64_t sector_num,
150 int bdrv_is_allocated(BlockDriverState *bs, int64_t sector_num, int nb_sectors,
197 int bdrv_write_compressed(BlockDriverState *bs, int64_t sector_num,