Lines Matching full:l2
200 * @offset: A guest offset, used to calculate what slice of the L2
202 * @l2_offset: Offset to the L2 table in the image file.
203 * @l2_slice: Location to store the pointer to the L2 slice.
205 * Loads a L2 slice into memory (L2 slices are the parts of L2 tables
207 * the cache is used; otherwise the L2 slice is loaded from the image
266 * Allocate a new l2 entry in the file. If l1_index points to an already
267 * used entry in the L2 table (i.e. we are doing a copy on write for the L2
268 * table) copy the contents of the old L2 table into the newly allocated one.
286 /* allocate a new l2 entry */ in l2_allocate()
300 "allocation of L2 table at offset 0"); in l2_allocate()
310 /* allocate a new entry in the l2 cache */ in l2_allocate()
325 /* if there was no old l2 table, clear the new slice */ in l2_allocate()
332 /* if there was an old l2 table, read a slice from the disk */ in l2_allocate()
345 /* write the l2 slice to the file */ in l2_allocate()
383 * For a given L2 entry, count the number of contiguous subclusters of
391 * If the L2 entry is invalid return -errno and set @type to
433 * in a given L2 slice, starting from cluster @l2_index, subcluster
574 * If the cluster is compressed then *host_offset will contain the l2 entry.
603 * containing offset and the end of the l2 slice that contains in qcow2_get_host_offset()
615 /* seek to the l2 offset in the l1 table */ in qcow2_get_host_offset()
630 qcow2_signal_corruption(bs, true, -1, -1, "L2 table offset %#" PRIx64 in qcow2_get_host_offset()
636 /* load the l2 slice in memory */ in qcow2_get_host_offset()
660 " in pre-v3 image (L2 offset: %#" PRIx64 in qcow2_get_host_offset()
661 ", L2 index: %#x)", l2_offset, l2_index); in qcow2_get_host_offset()
672 "file (L2 offset: %#" PRIx64 ", L2 index: " in qcow2_get_host_offset()
690 PRIx64 " unaligned (L2 offset: %#" PRIx64 in qcow2_get_host_offset()
691 ", L2 index: %#x)", host_cluster_offset, in qcow2_get_host_offset()
701 ", L2 index: %#x)", host_cluster_offset, in qcow2_get_host_offset()
716 " (L2 offset: %#" PRIx64 ", L2 index: %#x)", in qcow2_get_host_offset()
749 * the appropriate slice of its l2 table.
751 * the cluster index in the l2 slice is given to the caller.
765 /* seek to the l2 offset in the l1 table */ in get_cluster_table()
778 qcow2_signal_corruption(bs, true, -1, -1, "L2 table offset %#" PRIx64 in get_cluster_table()
785 /* First allocate a new L2 table (and do COW if needed) */ in get_cluster_table()
797 /* Get the offset of the newly-allocated l2 table */ in get_cluster_table()
802 /* load the l2 slice in memory */ in get_cluster_table()
864 /* The offset and size must fit in their fields of the L2 table entry */ in qcow2_alloc_compressed_cluster_offset()
871 /* update L2 table */ in qcow2_alloc_compressed_cluster_offset()
1015 * Before we update the L2 table to actually point to the new cluster, we in perform_cow()
1051 /* Update L2 table. */ in qcow2_alloc_cluster_link_l2()
1073 * The first one to complete updates l2 table with pointer to its in qcow2_alloc_cluster_link_l2()
1075 * perform_cow()), update l2 table with its cluster pointer and free in qcow2_alloc_cluster_link_l2()
1081 /* The offset must fit in the offset field of the L2 table entry */ in qcow2_alloc_cluster_link_l2()
1142 * request does not need copy-on-write or changes to the L2 metadata
1150 * @l2_slice contains the L2 entries of all clusters involved in this
1201 "entry found (L2 offset: %#" PRIx64 in calculate_l2_meta()
1202 ", L2 index: %#x)", in calculate_l2_meta()
1212 /* Get the L2 entry of the first cluster */ in calculate_l2_meta()
1256 /* Get the L2 entry of the last cluster */ in calculate_l2_meta()
1393 * request has completed and updated the L2 table accordingly.
1513 * Calculate the number of clusters to look for. We stop at L2 slice in handle_copied()
1524 /* Find L2 entry for the first involved cluster */ in handle_copied()
1678 * Calculate the number of clusters to look for. We stop at L2 slice in handle_alloc()
1689 /* Find L2 entry for the first involved cluster */ in handle_alloc()
1774 * not. The caller is responsible for updating the L2 metadata of the
1898 * all clusters in the same L2 slice) and returns the number of discarded
1916 /* Limit nb_clusters to one L2 slice */ in discard_in_l2_slice()
1972 /* First remove L2 entries */ in discard_in_l2_slice()
2014 /* Each L2 slice is handled by its own loop iteration */ in qcow2_cluster_discard()
2037 * all clusters in the same L2 slice) and returns the number of zeroed
2055 /* Limit nb_clusters to one L2 slice */ in zero_in_l2_slice()
2084 /* First update L2 entries */ in zero_in_l2_slice()
2211 /* Each L2 slice is handled by its own loop iteration */ in qcow2_subcluster_zeroize()
2269 /* inactive L2 tables require a buffer to be stored in when loading in expand_zero_clusters_in_l1()
2291 qcow2_signal_corruption(bs, true, -1, -1, "L2 table offset %#" in expand_zero_clusters_in_l1()
2308 /* get active L2 tables from cache */ in expand_zero_clusters_in_l1()
2312 /* load inactive L2 tables from disk */ in expand_zero_clusters_in_l1()
2353 /* For shared L2 tables, set the refcount accordingly in expand_zero_clusters_in_l1()
2372 "%#" PRIx64 " unaligned (L2 offset: %#" in expand_zero_clusters_in_l1()
2373 PRIx64 ", L2 index: %#x)", offset, in expand_zero_clusters_in_l1()
2488 /* Inactive L1 tables may point to active L2 tables - therefore it is in qcow2_expand_zero_clusters()
2489 * necessary to flush the L2 table cache before trying to access the L2 in qcow2_expand_zero_clusters()
2492 * necessary to empty the L2 table cache, since it may contain tables which in qcow2_expand_zero_clusters()