• Home
  • Raw
  • Download

Lines Matching refs:sector_num

48         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
925 start = sector_num / BDRV_SECTORS_PER_DIRTY_CHUNK; in set_dirty_bitmap()
926 end = (sector_num + nb_sectors - 1) / BDRV_SECTORS_PER_DIRTY_CHUNK; in set_dirty_bitmap()
953 int bdrv_write(BlockDriverState *bs, int64_t sector_num, in bdrv_write() argument
961 if (bdrv_check_request(bs, sector_num, nb_sectors)) in bdrv_write()
965 set_dirty_bitmap(bs, sector_num, nb_sectors, 1); in bdrv_write()
968 if (bs->wr_highest_sector < sector_num + nb_sectors - 1) { in bdrv_write()
969 bs->wr_highest_sector = sector_num + nb_sectors - 1; in bdrv_write()
972 return drv->bdrv_write(bs, sector_num, buf, nb_sectors); in bdrv_write()
980 int64_t sector_num; in bdrv_pread() local
988 sector_num = offset >> BDRV_SECTOR_BITS; in bdrv_pread()
990 if ((ret = bdrv_read(bs, sector_num, tmp_buf, 1)) < 0) in bdrv_pread()
996 sector_num++; in bdrv_pread()
1003 if ((ret = bdrv_read(bs, sector_num, buf, nb_sectors)) < 0) in bdrv_pread()
1005 sector_num += nb_sectors; in bdrv_pread()
1013 if ((ret = bdrv_read(bs, sector_num, tmp_buf, 1)) < 0) in bdrv_pread()
1025 int64_t sector_num; in bdrv_pwrite() local
1033 sector_num = offset >> BDRV_SECTOR_BITS; in bdrv_pwrite()
1035 if ((ret = bdrv_read(bs, sector_num, tmp_buf, 1)) < 0) in bdrv_pwrite()
1038 if ((ret = bdrv_write(bs, sector_num, tmp_buf, 1)) < 0) in bdrv_pwrite()
1043 sector_num++; in bdrv_pwrite()
1050 if ((ret = bdrv_write(bs, sector_num, buf, nb_sectors)) < 0) in bdrv_pwrite()
1052 sector_num += nb_sectors; in bdrv_pwrite()
1060 if ((ret = bdrv_read(bs, sector_num, tmp_buf, 1)) < 0) in bdrv_pwrite()
1063 if ((ret = bdrv_write(bs, sector_num, tmp_buf, 1)) < 0) in bdrv_pwrite()
1099 int bdrv_write_sync(BlockDriverState *bs, int64_t sector_num, in bdrv_write_sync() argument
1102 return bdrv_pwrite_sync(bs, BDRV_SECTOR_SIZE * sector_num, in bdrv_write_sync()
1500 int bdrv_is_allocated(BlockDriverState *bs, int64_t sector_num, int nb_sectors, in bdrv_is_allocated() argument
1505 if (sector_num >= bs->total_sectors) { in bdrv_is_allocated()
1509 n = bs->total_sectors - sector_num; in bdrv_is_allocated()
1513 return bs->drv->bdrv_is_allocated(bs, sector_num, nb_sectors, pnum); in bdrv_is_allocated()
1728 int bdrv_write_compressed(BlockDriverState *bs, int64_t sector_num, in bdrv_write_compressed() argument
1736 if (bdrv_check_request(bs, sector_num, nb_sectors)) in bdrv_write_compressed()
1740 set_dirty_bitmap(bs, sector_num, nb_sectors, 1); in bdrv_write_compressed()
1743 return drv->bdrv_write_compressed(bs, sector_num, buf, nb_sectors); in bdrv_write_compressed()
1979 BlockDriverAIOCB *bdrv_aio_readv(BlockDriverState *bs, int64_t sector_num, in bdrv_aio_readv() argument
1988 if (bdrv_check_request(bs, sector_num, nb_sectors)) in bdrv_aio_readv()
1991 ret = drv->bdrv_aio_readv(bs, sector_num, qiov, nb_sectors, in bdrv_aio_readv()
2003 BlockDriverAIOCB *bdrv_aio_writev(BlockDriverState *bs, int64_t sector_num, in bdrv_aio_writev() argument
2014 if (bdrv_check_request(bs, sector_num, nb_sectors)) in bdrv_aio_writev()
2018 set_dirty_bitmap(bs, sector_num, nb_sectors, 1); in bdrv_aio_writev()
2021 ret = drv->bdrv_aio_writev(bs, sector_num, qiov, nb_sectors, in bdrv_aio_writev()
2028 if (bs->wr_highest_sector < sector_num + nb_sectors - 1) { in bdrv_aio_writev()
2029 bs->wr_highest_sector = sector_num + nb_sectors - 1; in bdrv_aio_writev()
2320 int64_t sector_num, in bdrv_aio_rw_vector() argument
2340 acb->ret = bdrv_write(bs, sector_num, acb->bounce, nb_sectors); in bdrv_aio_rw_vector()
2342 acb->ret = bdrv_read(bs, sector_num, acb->bounce, nb_sectors); in bdrv_aio_rw_vector()
2351 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, in bdrv_aio_readv_em() argument
2354 return bdrv_aio_rw_vector(bs, sector_num, qiov, nb_sectors, cb, opaque, 0); in bdrv_aio_readv_em()
2358 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, in bdrv_aio_writev_em() argument
2361 return bdrv_aio_rw_vector(bs, sector_num, qiov, nb_sectors, cb, opaque, 1); in bdrv_aio_writev_em()
2412 static int bdrv_read_em(BlockDriverState *bs, int64_t sector_num, in bdrv_read_em() argument
2426 acb = bdrv_aio_readv(bs, sector_num, &qiov, nb_sectors, in bdrv_read_em()
2443 static int bdrv_write_em(BlockDriverState *bs, int64_t sector_num, in bdrv_write_em() argument
2457 acb = bdrv_aio_writev(bs, sector_num, &qiov, nb_sectors, in bdrv_write_em()