Lines Matching defs:sector
748 int64_t sector, total_sectors;
796 for (sector = 0; sector < total_sectors; sector += n) {
797 if (drv->bdrv_is_allocated(bs, sector, COMMIT_BUF_SECTORS, &n)) {
799 if (bdrv_read(bs, sector, buf, n) != 0) {
804 if (bdrv_write(bs->backing_hd, sector, buf, n) != 0) {
948 -EINVAL Invalid sector number or nb_sectors
982 /* first read to align to sector start */
1009 /* add data from the last sector */
1027 /* first write to align to sector start */
1056 /* add data from the last sector */
1158 uint8_t sector; /* starting sector */
1162 uint8_t end_sector; /* end sector */
1164 uint32_t start_sect; /* starting sector counting from 0 */
1488 * Returns true iff the specified sector is present in the disk image. Drivers
1493 * the specified sector) that are known to be in the same
2081 * Note that we can't simply subtract req2->sector from req1->sector
2084 if (req1->sector > req2->sector) {
2086 } else if (req1->sector < req2->sector) {
2102 // Sort requests by start sector
2110 int64_t oldreq_last = reqs[outidx].sector + reqs[outidx].nb_sectors;
2114 if (reqs[i].sector <= oldreq_last) {
2138 size = (reqs[i].sector - reqs[outidx].sector) << 9;
2142 if (reqs[i].sector > oldreq_last) {
2143 size_t zero_bytes = (reqs[i].sector - oldreq_last) << 9;
2159 reqs[outidx].sector = reqs[i].sector;
2228 acb = bdrv_aio_writev(bs, reqs[i].sector, reqs[i].qiov,
2640 int bdrv_get_dirty(BlockDriverState *bs, int64_t sector)
2642 int64_t chunk = sector / (int64_t)BDRV_SECTORS_PER_DIRTY_CHUNK;
2645 (sector << BDRV_SECTOR_BITS) < bdrv_getlength(bs)) {