Lines Matching refs:nb_clusters
972 uint64_t i, nb_clusters, refcount; in alloc_clusters_noref() local
980 nb_clusters = size_to_clusters(s, size); in alloc_clusters_noref()
982 for(i = 0; i < nb_clusters; i++) { in alloc_clusters_noref()
1004 (s->free_cluster_index - nb_clusters) << s->cluster_bits); in alloc_clusters_noref()
1006 return (s->free_cluster_index - nb_clusters) << s->cluster_bits; in alloc_clusters_noref()
1032 int64_t nb_clusters) in qcow2_alloc_clusters_at() argument
1039 assert(nb_clusters >= 0); in qcow2_alloc_clusters_at()
1040 if (nb_clusters == 0) { in qcow2_alloc_clusters_at()
1047 for(i = 0; i < nb_clusters; i++) { in qcow2_alloc_clusters_at()
2088 void **refcount_table, int64_t *nb_clusters) in check_refblocks() argument
2116 if (cluster >= *nb_clusters) { in check_refblocks()
2143 assert(new_nb_clusters >= *nb_clusters); in check_refblocks()
2146 nb_clusters, new_nb_clusters); in check_refblocks()
2152 if (cluster >= *nb_clusters) { in check_refblocks()
2160 refcount_table, nb_clusters, in check_refblocks()
2179 ret = qcow2_inc_refcounts_imrt(bs, res, refcount_table, nb_clusters, in check_refblocks()
2203 void **refcount_table, int64_t *nb_clusters) in calculate_refcounts() argument
2213 &old_size, *nb_clusters); in calculate_refcounts()
2221 ret = qcow2_inc_refcounts_imrt(bs, res, refcount_table, nb_clusters, in calculate_refcounts()
2228 ret = check_refcounts_l1(bs, res, refcount_table, nb_clusters, in calculate_refcounts()
2258 ret = check_refcounts_l1(bs, res, refcount_table, nb_clusters, in calculate_refcounts()
2265 ret = qcow2_inc_refcounts_imrt(bs, res, refcount_table, nb_clusters, in calculate_refcounts()
2272 ret = qcow2_inc_refcounts_imrt(bs, res, refcount_table, nb_clusters, in calculate_refcounts()
2282 ret = qcow2_inc_refcounts_imrt(bs, res, refcount_table, nb_clusters, in calculate_refcounts()
2291 ret = qcow2_check_bitmaps_refcounts(bs, res, refcount_table, nb_clusters); in calculate_refcounts()
2296 return check_refblocks(bs, res, fix, rebuild, refcount_table, nb_clusters); in calculate_refcounts()
2307 void *refcount_table, int64_t nb_clusters) in compare_refcounts() argument
2314 for (i = 0, *highest_cluster = 0; i < nb_clusters; i++) { in compare_refcounts()
2470 BlockDriverState *bs, void **refcount_table, int64_t *nb_clusters, in rebuild_refcounts_write_refblocks() argument
2521 nb_clusters, in rebuild_refcounts_write_refblocks()
2609 void **refcount_table, int64_t *nb_clusters, in rebuild_refcount_structure() argument
2658 rebuild_refcounts_write_refblocks(bs, refcount_table, nb_clusters, in rebuild_refcount_structure()
2659 0, *nb_clusters, in rebuild_refcount_structure()
2682 refcount_table, nb_clusters, in rebuild_refcount_structure()
2700 rebuild_refcounts_write_refblocks(bs, refcount_table, nb_clusters, in rebuild_refcount_structure()
2787 int64_t size, highest_cluster, nb_clusters; in qcow2_check_refcounts() local
2798 nb_clusters = size_to_clusters(s, size); in qcow2_check_refcounts()
2799 if (nb_clusters > INT_MAX) { in qcow2_check_refcounts()
2808 &nb_clusters); in qcow2_check_refcounts()
2818 nb_clusters); in qcow2_check_refcounts()
2827 &nb_clusters, &local_err); in qcow2_check_refcounts()
2839 memset(refcount_table, 0, refcount_array_byte_size(s, nb_clusters)); in qcow2_check_refcounts()
2841 &nb_clusters); in qcow2_check_refcounts()
2854 &highest_cluster, refcount_table, nb_clusters); in qcow2_check_refcounts()
2885 refcount_table, nb_clusters); in qcow2_check_refcounts()