• Home
  • Raw
  • Download

Lines Matching defs:sector_num

46         int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
49 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
55 static int bdrv_read_em(BlockDriverState *bs, int64_t sector_num,
57 static int bdrv_write_em(BlockDriverState *bs, int64_t sector_num,
896 static int bdrv_check_request(BlockDriverState *bs, int64_t sector_num,
899 return bdrv_check_byte_request(bs, sector_num * BDRV_SECTOR_SIZE,
904 int bdrv_read(BlockDriverState *bs, int64_t sector_num,
911 if (bdrv_check_request(bs, sector_num, nb_sectors))
914 return drv->bdrv_read(bs, sector_num, buf, nb_sectors);
917 static void set_dirty_bitmap(BlockDriverState *bs, int64_t sector_num,
923 start = sector_num / BDRV_SECTORS_PER_DIRTY_CHUNK;
924 end = (sector_num + nb_sectors - 1) / BDRV_SECTORS_PER_DIRTY_CHUNK;
951 int bdrv_write(BlockDriverState *bs, int64_t sector_num,
959 if (bdrv_check_request(bs, sector_num, nb_sectors))
963 set_dirty_bitmap(bs, sector_num, nb_sectors, 1);
966 if (bs->wr_highest_sector < sector_num + nb_sectors - 1) {
967 bs->wr_highest_sector = sector_num + nb_sectors - 1;
970 return drv->bdrv_write(bs, sector_num, buf, nb_sectors);
978 int64_t sector_num;
986 sector_num = offset >> BDRV_SECTOR_BITS;
988 if ((ret = bdrv_read(bs, sector_num, tmp_buf, 1)) < 0)
994 sector_num++;
1001 if ((ret = bdrv_read(bs, sector_num, buf, nb_sectors)) < 0)
1003 sector_num += nb_sectors;
1011 if ((ret = bdrv_read(bs, sector_num, tmp_buf, 1)) < 0)
1023 int64_t sector_num;
1031 sector_num = offset >> BDRV_SECTOR_BITS;
1033 if ((ret = bdrv_read(bs, sector_num, tmp_buf, 1)) < 0)
1036 if ((ret = bdrv_write(bs, sector_num, tmp_buf, 1)) < 0)
1041 sector_num++;
1048 if ((ret = bdrv_write(bs, sector_num, buf, nb_sectors)) < 0)
1050 sector_num += nb_sectors;
1058 if ((ret = bdrv_read(bs, sector_num, tmp_buf, 1)) < 0)
1061 if ((ret = bdrv_write(bs, sector_num, tmp_buf, 1)) < 0)
1097 int bdrv_write_sync(BlockDriverState *bs, int64_t sector_num,
1100 return bdrv_pwrite_sync(bs, BDRV_SECTOR_SIZE * sector_num,
1498 int bdrv_is_allocated(BlockDriverState *bs, int64_t sector_num, int nb_sectors,
1503 if (sector_num >= bs->total_sectors) {
1507 n = bs->total_sectors - sector_num;
1511 return bs->drv->bdrv_is_allocated(bs, sector_num, nb_sectors, pnum);
1726 int bdrv_write_compressed(BlockDriverState *bs, int64_t sector_num,
1734 if (bdrv_check_request(bs, sector_num, nb_sectors))
1738 set_dirty_bitmap(bs, sector_num, nb_sectors, 1);
1741 return drv->bdrv_write_compressed(bs, sector_num, buf, nb_sectors);
1977 BlockDriverAIOCB *bdrv_aio_readv(BlockDriverState *bs, int64_t sector_num,
1986 if (bdrv_check_request(bs, sector_num, nb_sectors))
1989 ret = drv->bdrv_aio_readv(bs, sector_num, qiov, nb_sectors,
2001 BlockDriverAIOCB *bdrv_aio_writev(BlockDriverState *bs, int64_t sector_num,
2012 if (bdrv_check_request(bs, sector_num, nb_sectors))
2016 set_dirty_bitmap(bs, sector_num, nb_sectors, 1);
2019 ret = drv->bdrv_aio_writev(bs, sector_num, qiov, nb_sectors,
2026 if (bs->wr_highest_sector < sector_num + nb_sectors - 1) {
2027 bs->wr_highest_sector = sector_num + nb_sectors - 1;
2318 int64_t sector_num,
2338 acb->ret = bdrv_write(bs, sector_num, acb->bounce, nb_sectors);
2340 acb->ret = bdrv_read(bs, sector_num, acb->bounce, nb_sectors);
2349 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
2352 return bdrv_aio_rw_vector(bs, sector_num, qiov, nb_sectors, cb, opaque, 0);
2356 int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
2359 return bdrv_aio_rw_vector(bs, sector_num, qiov, nb_sectors, cb, opaque, 1);
2410 static int bdrv_read_em(BlockDriverState *bs, int64_t sector_num,
2424 acb = bdrv_aio_readv(bs, sector_num, &qiov, nb_sectors,
2441 static int bdrv_write_em(BlockDriverState *bs, int64_t sector_num,
2455 acb = bdrv_aio_writev(bs, sector_num, &qiov, nb_sectors,