Lines Matching refs:l2_offset
365 int64_t l2_offset; in get_cluster_offset() local
372 l2_offset = s->l1_table[l1_index]; in get_cluster_offset()
374 if (!l2_offset) { in get_cluster_offset()
378 l2_offset = bdrv_co_getlength(bs->file->bs); in get_cluster_offset()
379 if (l2_offset < 0) { in get_cluster_offset()
380 return l2_offset; in get_cluster_offset()
383 l2_offset = QEMU_ALIGN_UP(l2_offset, s->cluster_size); in get_cluster_offset()
385 s->l1_table[l1_index] = l2_offset; in get_cluster_offset()
386 tmp = cpu_to_be64(l2_offset); in get_cluster_offset()
397 if (l2_offset == s->l2_cache_offsets[i]) { in get_cluster_offset()
421 ret = bdrv_co_pwrite_sync(bs->file, l2_offset, in get_cluster_offset()
427 ret = bdrv_co_pread(bs->file, l2_offset, in get_cluster_offset()
433 s->l2_cache_offsets[min_index] = l2_offset; in get_cluster_offset()
522 ret = bdrv_co_pwrite_sync(bs->file, l2_offset + l2_index * sizeof(tmp), in get_cluster_offset()