Re: [PATCH v9 21/34] qcow2: Add subcluster support to qcow2_get_host_offset()

2020-07-02 Thread Alberto Garcia
On Thu 02 Jul 2020 02:46:27 PM CEST, Max Reitz wrote: >> -/* must be allocated */ >> -assert(first_cluster_type == QCOW2_CLUSTER_NORMAL || >> - first_cluster_type == QCOW2_CLUSTER_ZERO_ALLOC); >> +assert(*l2_index + nb_clusters <= s->l2_size); > > Not l2_slice_size? Oh, indee

Re: [PATCH v9 21/34] qcow2: Add subcluster support to qcow2_get_host_offset()

2020-07-02 Thread Max Reitz
On 28.06.20 13:02, Alberto Garcia wrote: > The logic of this function remains pretty much the same, except that > it uses count_contiguous_subclusters(), which combines the logic of > count_contiguous_clusters() / count_contiguous_clusters_unallocated() > and checks individual subclusters. > > qco

[PATCH v9 21/34] qcow2: Add subcluster support to qcow2_get_host_offset()

2020-06-28 Thread Alberto Garcia
The logic of this function remains pretty much the same, except that it uses count_contiguous_subclusters(), which combines the logic of count_contiguous_clusters() / count_contiguous_clusters_unallocated() and checks individual subclusters. qcow2_cluster_to_subcluster_type() is not necessary as a