Lines Matching +full:cluster +full:- +full:index
11 * See the COPYING.LIB file in the top-level directory.
23 * +--------+----------+----------+----------+-----+
25 * +--------+----------+----------+----------+-----+
27 * There is a 2-level pagetable for cluster allocation:
29 * +----------+
31 * +----------+
32 * ,------' | '------.
33 * +----------+ | +----------+
35 * +----------+ +----------+
36 * ,------' | '------.
37 * +----------+ | +----------+
39 * +----------+ +----------+
45 * All fields are little-endian on disk.
60 /* Feature bits must be used when the on-disk format changes */
67 /* Data is stored in groups of sectors called clusters. Cluster size must
69 * sub-cluster size will require read-modify-write.
74 /* Allocated clusters are tracked using a 2-level pagetable. Table size is
76 * without jacking up the cluster size too much.
95 uint64_t autoclear_features; /* self-resetting feature bits */
109 /* The L2 cache is a simple write-through cache for L2 structures */
137 /* User scatter-gather list */
141 /* Current cluster scatter-gather list */
144 uint64_t cur_cluster; /* cluster offset in image file */
157 QEDHeader header; /* always cpu-endian */
179 QED_CLUSTER_FOUND, /* cluster found */
180 QED_CLUSTER_ZERO, /* zero cluster found */
181 QED_CLUSTER_L2, /* cluster missing in L2 */
182 QED_CLUSTER_L1, /* cluster missing in L1 */
206 qed_write_l1_table(BDRVQEDState *s, unsigned int index, unsigned int n);
209 qed_write_l1_table_sync(BDRVQEDState *s, unsigned int index, unsigned int n);
218 qed_write_l2_table(BDRVQEDState *s, QEDRequest *request, unsigned int index,
223 unsigned int index, unsigned int n, bool flush);
226 * Cluster functions
241 * Round down to the start of a cluster
245 return offset & ~(uint64_t)(s->header.cluster_size - 1); in qed_start_of_cluster()
250 return offset & (s->header.cluster_size - 1); in qed_offset_into_cluster()
255 return qed_start_of_cluster(s, bytes + (s->header.cluster_size - 1)) / in qed_bytes_to_clusters()
256 (s->header.cluster_size - 1); in qed_bytes_to_clusters()
261 return pos >> s->l1_shift; in qed_l1_index()
266 return (pos >> s->l2_shift) & s->l2_mask; in qed_l2_index()
270 * Test if a cluster offset is valid
274 uint64_t header_size = (uint64_t)s->header.header_size * in qed_check_cluster_offset()
275 s->header.cluster_size; in qed_check_cluster_offset()
277 if (offset & (s->header.cluster_size - 1)) { in qed_check_cluster_offset()
280 return offset >= header_size && offset < s->file_size; in qed_check_cluster_offset()
288 uint64_t end_offset = offset + (s->header.table_size - 1) * in qed_check_table_offset()
289 s->header.cluster_size; in qed_check_table_offset()