Lines Matching refs:old_file_size
4328 int64_t last_cluster, old_file_size; in qcow2_co_truncate() local
4359 old_file_size = bdrv_co_getlength(bs->file->bs); in qcow2_co_truncate()
4360 if (old_file_size < 0) { in qcow2_co_truncate()
4361 error_setg_errno(errp, -old_file_size, in qcow2_co_truncate()
4363 ret = old_file_size; in qcow2_co_truncate()
4366 last_cluster = qcow2_get_last_cluster(bs, old_file_size); in qcow2_co_truncate()
4373 if ((last_cluster + 1) * s->cluster_size < old_file_size) { in qcow2_co_truncate()
4438 int64_t old_file_size, last_cluster, new_file_size; in qcow2_co_truncate() local
4452 old_file_size = bdrv_co_getlength(bs->file->bs); in qcow2_co_truncate()
4453 if (old_file_size < 0) { in qcow2_co_truncate()
4454 error_setg_errno(errp, -old_file_size, in qcow2_co_truncate()
4456 ret = old_file_size; in qcow2_co_truncate()
4460 last_cluster = qcow2_get_last_cluster(bs, old_file_size); in qcow2_co_truncate()
4462 old_file_size = (last_cluster + 1) * s->cluster_size; in qcow2_co_truncate()
4464 old_file_size = ROUND_UP(old_file_size, s->cluster_size); in qcow2_co_truncate()
4486 allocation_start = qcow2_refcount_area(bs, old_file_size, in qcow2_co_truncate()