Lines Matching +full:cluster +full:- +full:index

2  * QEMU Enhanced Disk Format Cluster functions
11 * See the COPYING.LIB file in the top-level directory.
23 * @index: First cluster index
25 * @offset: Set to first cluster offset
32 unsigned int index, in qed_count_contiguous_clusters() argument
36 unsigned int end = MIN(index + n, s->table_nelems); in qed_count_contiguous_clusters()
37 uint64_t last = table->offsets[index]; in qed_count_contiguous_clusters()
42 for (i = index + 1; i < end; i++) { in qed_count_contiguous_clusters()
45 if (!qed_offset_is_unalloc_cluster(table->offsets[i])) { in qed_count_contiguous_clusters()
50 if (!qed_offset_is_zero_cluster(table->offsets[i])) { in qed_count_contiguous_clusters()
55 if (table->offsets[i] != last + s->header.cluster_size) { in qed_count_contiguous_clusters()
58 last = table->offsets[i]; in qed_count_contiguous_clusters()
61 return i - index; in qed_count_contiguous_clusters()
65 * Find the offset of a data cluster
77 * If the L2 table exists, request->l2_table points to the L2 table cache entry
80 * again later during request processing. If request->l2_table is non-NULL it
97 unsigned int index; in qed_find_cluster() local
104 *len = MIN(*len, (((pos >> s->l1_shift) + 1) << s->l1_shift) - pos); in qed_find_cluster()
106 l2_offset = s->l1_table->offsets[qed_l1_index(s, pos)]; in qed_find_cluster()
113 return -EINVAL; in qed_find_cluster()
121 index = qed_l2_index(s, pos); in qed_find_cluster()
123 n = qed_count_contiguous_clusters(s, request->l2_table->table, in qed_find_cluster()
124 index, n, &offset); in qed_find_cluster()
133 ret = -EINVAL; in qed_find_cluster()
137 n * s->header.cluster_size - qed_offset_into_cluster(s, pos)); in qed_find_cluster()