Lines Matching refs:host_off

230         int64_t host_off = bat2sect(s, i) << BDRV_SECTOR_BITS;  in parallels_fill_used_bitmap()  local
231 if (host_off == 0) { in parallels_fill_used_bitmap()
235 err2 = mark_used(bs, s->used_bmap, s->used_bmap_size, host_off, 1); in parallels_fill_used_bitmap()
256 int64_t i, pos, idx, to_allocate, first_free, host_off; in allocate_clusters() local
285 host_off = s->data_end * BDRV_SECTOR_SIZE; in allocate_clusters()
293 ret = bdrv_co_truncate(bs->file, host_off + bytes, in allocate_clusters()
301 ret = bdrv_co_pwrite_zeroes(bs->file, host_off, bytes, 0); in allocate_clusters()
321 host_off = s->data_start * BDRV_SECTOR_SIZE; in allocate_clusters()
322 host_off += first_free * s->cluster_size; in allocate_clusters()
330 host_off < s->data_end * BDRV_SECTOR_SIZE) { in allocate_clusters()
331 ret = bdrv_co_pwrite_zeroes(bs->file, host_off, in allocate_clusters()
368 ret = mark_used(bs, s->used_bmap, s->used_bmap_size, host_off, to_allocate); in allocate_clusters()
375 host_off / BDRV_SECTOR_SIZE / s->off_multiplier); in allocate_clusters()
376 host_off += s->cluster_size; in allocate_clusters()
378 if (host_off > s->data_end * BDRV_SECTOR_SIZE) { in allocate_clusters()
379 s->data_end = host_off / BDRV_SECTOR_SIZE; in allocate_clusters()
563 int64_t host_off = bat2sect(s, cluster) << BDRV_SECTOR_BITS; in parallels_co_pdiscard() local
564 if (host_off == 0) { in parallels_co_pdiscard()
568 ret = bdrv_co_pdiscard(bs->file, host_off, s->cluster_size); in parallels_co_pdiscard()
574 bitmap_clear(s->used_bmap, host_cluster_index(s, host_off), 1); in parallels_co_pdiscard()
793 int64_t host_off, host_sector, guest_sector; in parallels_check_duplicate() local
824 host_off = bat2sect(s, i) << BDRV_SECTOR_BITS; in parallels_check_duplicate()
825 if (host_off == 0) { in parallels_check_duplicate()
829 ret = mark_used(bs, bitmap, bitmap_size, host_off, 1); in parallels_check_duplicate()
856 ret = bdrv_co_pread(bs->file, host_off, s->cluster_size, buf, 0); in parallels_check_duplicate()
868 host_off = host_sector << BDRV_SECTOR_BITS; in parallels_check_duplicate()
870 ret = bdrv_co_pwrite(bs->file, host_off, s->cluster_size, buf, 0); in parallels_check_duplicate()
876 if (host_off + s->cluster_size > res->image_end_offset) { in parallels_check_duplicate()
877 res->image_end_offset = host_off + s->cluster_size; in parallels_check_duplicate()
889 ret = mark_used(bs, bitmap, bitmap_size, host_off, 1); in parallels_check_duplicate()