/openbmc/qemu/tests/qemu-iotests/ |
H A D | common.pattern | 66 local cluster_size=$3 72 local half_cluster=$((cluster_size / 2)) 73 local quarter_cluster=$((cluster_size / 4)) 74 local l2_size=$((cluster_size * cluster_size / 8)) 77 io "$op" $offset $cluster_size $cluster_size $num_small 78 offset=$((offset + num_small * $cluster_size)) 81 io "$op" $((offset + $half_cluster)) $half_cluster $cluster_size $num_small 82 offset=$((offset + num_small * $cluster_size)) 85 io "$op" $offset $half_cluster $cluster_size $num_small 86 offset=$((offset + num_small * $cluster_size)) [all …]
|
H A D | 082 | 61 run_qemu_img create -f $IMGFMT -o cluster_size=4k -o lazy_refcounts=on "$TEST_IMG" $size 65 run_qemu_img create -f $IMGFMT -o cluster_size=4k -o lazy_refcounts=on -o cluster_size=8k "$TEST_IM… 67 run_qemu_img create -f $IMGFMT -o cluster_size=4k,cluster_size=8k "$TEST_IMG" $size 78 run_qemu_img create -f $IMGFMT -o cluster_size=4k,help "$TEST_IMG" $size 79 run_qemu_img create -f $IMGFMT -o cluster_size=4k,\? "$TEST_IMG" $size 80 run_qemu_img create -f $IMGFMT -o help,cluster_size=4k "$TEST_IMG" $size 81 run_qemu_img create -f $IMGFMT -o \?,cluster_size=4k "$TEST_IMG" $size 84 run_qemu_img create -f $IMGFMT -o cluster_size=4k -o help "$TEST_IMG" $size 85 run_qemu_img create -f $IMGFMT -o cluster_size=4k -o \? "$TEST_IMG" $size 120 run_qemu_img convert -O $IMGFMT -o cluster_size=4k -o lazy_refcounts=on "$TEST_IMG" "$TEST_IMG".base [all …]
|
H A D | 049.out | 7 Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib s… 10 Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib s… 13 Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib s… 16 Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib s… 19 Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib s… 22 Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib s… 25 Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib s… 28 Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib s… 31 Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib s… 34 Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib s… [all …]
|
H A D | 214 | 54 _make_test_img 8M -o cluster_size=2M,compression_type=zlib 97 cluster_size=0x10000 98 _make_test_img 2M -o cluster_size=$cluster_size 101 let data_size="8 * $cluster_size" 108 _make_test_img 2M -o cluster_size=$cluster_size 110 let data_size="3 * $cluster_size + $cluster_size / 2" 118 let offset="4 * $cluster_size + $cluster_size / 4"
|
H A D | qcow2_format.py | 148 def __init__(self, fd, cluster_size): argument 154 self.cluster_size = cluster_size 161 [Qcow2BitmapDirEntry(fd, cluster_size=self.cluster_size) 188 def __init__(self, fd, cluster_size): argument 190 self.cluster_size = cluster_size 202 cluster_size=self.cluster_size) 253 def __init__(self, fd, offset, nb_entries, cluster_size): argument 254 self.cluster_size = cluster_size 265 size = self.cluster_size 299 cluster_size=None): argument [all …]
|
H A D | 125.out | 2 --- cluster_size=512 growth_size=16 create_mode=off growth_mode=off --- 10 --- cluster_size=512 growth_size=16 create_mode=off growth_mode=metadata --- 18 --- cluster_size=512 growth_size=16 create_mode=off growth_mode=falloc --- 26 --- cluster_size=512 growth_size=16 create_mode=off growth_mode=full --- 34 --- cluster_size=512 growth_size=16 create_mode=metadata growth_mode=off --- 42 --- cluster_size=512 growth_size=16 create_mode=metadata growth_mode=metadata --- 50 --- cluster_size=512 growth_size=16 create_mode=metadata growth_mode=falloc --- 58 --- cluster_size=512 growth_size=16 create_mode=metadata growth_mode=full --- 66 --- cluster_size=512 growth_size=16 create_mode=falloc growth_mode=off --- 74 --- cluster_size=512 growth_size=16 create_mode=falloc growth_mode=metadata --- [all …]
|
H A D | 313 | 45 _unsupported_imgopts cluster_size refcount_bits extended_l2 compat=0.10 data_file 49 cluster_size=4096 51 options="cluster_size=${cluster_size},refcount_bits=${refcount_bits}" 54 ref_entries=$(( ${cluster_size} * 8 / ${refcount_bits} )) 69 total_size=$(( ${total_data_clusters} * ${cluster_size} ))
|
H A D | 085.out | 19 Formatting 'TEST_DIR/1-snapshot-v0.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression… 48 Formatting 'TEST_DIR/2-snapshot-v0.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression… 49 Formatting 'TEST_DIR/2-snapshot-v1.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression… 60 Formatting 'TEST_DIR/3-snapshot-v0.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression… 61 Formatting 'TEST_DIR/3-snapshot-v1.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression… 72 Formatting 'TEST_DIR/4-snapshot-v0.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression… 73 Formatting 'TEST_DIR/4-snapshot-v1.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression… 84 Formatting 'TEST_DIR/5-snapshot-v0.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression… 85 Formatting 'TEST_DIR/5-snapshot-v1.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression… 96 Formatting 'TEST_DIR/6-snapshot-v0.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression… [all …]
|
H A D | 312 | 54 _unsupported_imgopts cluster_size data_file 60 TEST_IMG="$TEST_IMG.0" _make_test_img -o cluster_size=64k 10M 61 TEST_IMG="$TEST_IMG.1" _make_test_img -o cluster_size=64k 10M 62 TEST_IMG="$TEST_IMG.2" _make_test_img -o cluster_size=64k 10M 63 TEST_IMG="$TEST_IMG.3" _make_test_img -o cluster_size=64k 10M
|
H A D | 190 | 54 $QEMU_IMG measure -O qcow2 -o cluster_size=64k -f qcow2 "$TEST_IMG" 55 $QEMU_IMG measure -O qcow2 -o cluster_size=2M -f qcow2 "$TEST_IMG" 86 $QEMU_IMG measure -O qcow2 -o cluster_size=64k -f qcow2 "$TEST_IMG" 98 $QEMU_IMG measure --output=json -O qcow2 -o cluster_size=2M -f qcow2 "$TEST_IMG"
|
H A D | 027 | 46 cluster_size=65536 56 $QEMU_IO -c "write -pP 0xde $cluster_size $cluster_size" "$TEST_IMG" | _filter_qemu_io
|
H A D | 125 | 115 for cluster_size in 512 64k; do 120 …echo "--- cluster_size=$cluster_size growth_size=$GROWTH_SIZE create_mode=$create_mode growth_mode… 122 … _make_test_img -o "preallocation=$create_mode,cluster_size=$cluster_size" ${CREATION_SIZE} 179 _make_test_img -F raw -b "$TEST_IMG.base" -o cluster_size=64k "$orig_size"
|
H A D | 082.out | 6 Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib s… 10 cluster_size: 65536 12 Testing: create -f qcow2 -o cluster_size=4k -o lazy_refcounts=on TEST_DIR/t.qcow2 128M 13 Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=4096 extended_l2=off compression_type=zlib si… 17 cluster_size: 4096 26 Testing: create -f qcow2 -o cluster_size=4k -o lazy_refcounts=on -o cluster_size=8k TEST_DIR/t.qcow… 27 Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=8192 extended_l2=off compression_type=zlib si… 31 cluster_size: 8192 40 Testing: create -f qcow2 -o cluster_size=4k,cluster_size=8k TEST_DIR/t.qcow2 128M 41 Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=8192 extended_l2=off compression_type=zlib si… [all …]
|
/openbmc/qemu/tests/image-fuzzer/qcow2/ |
H A D | layout.py | 97 self.cluster_size = 1 << cluster_bits 111 self.cluster_size) 159 free_space = self.cluster_size - self.ext_offset - \ 168 self.cluster_size - len(backing_file_name) 189 (self.cluster_size - 1)) - \ 221 (self.cluster_size - 1)) - \ 272 offset = l2_cluster * self.cluster_size 273 l2_size = self.cluster_size // UINT64_S 275 cluster_descriptor = host * self.cluster_size 285 l2_size = self.cluster_size // UINT64_S [all …]
|
/openbmc/qemu/block/ |
H A D | block-copy.c | 128 int64_t cluster_size; member 170 return s->cluster_size; in block_copy_chunk_size() 173 return MIN(MAX(s->cluster_size, BLOCK_COPY_MAX_BUFFER), in block_copy_chunk_size() 176 return MIN(MAX(s->cluster_size, BLOCK_COPY_MAX_COPY_RANGE), in block_copy_chunk_size() 204 assert(QEMU_IS_ALIGNED(offset, s->cluster_size)); in block_copy_task_create() 205 bytes = QEMU_ALIGN_UP(bytes, s->cluster_size); in block_copy_task_create() 292 if (s->max_transfer < s->cluster_size) { in block_copy_set_copy_opts() 355 return MAX(min_cluster_size, bdi.cluster_size); in block_copy_calculate_cluster_size() 367 int64_t cluster_size; in block_copy_state_new() local 382 cluster_size = block_copy_calculate_cluster_size(target->bs, in block_copy_state_new() [all …]
|
H A D | qcow.c | 74 int cluster_size; member 234 s->cluster_size = 1 << s->cluster_bits; in qcow_open() 283 s->cluster_cache = g_malloc(s->cluster_size); in qcow_open() 284 s->cluster_data = g_malloc(s->cluster_size); in qcow_open() 383 l2_offset = QEMU_ALIGN_UP(l2_offset, s->cluster_size); in get_cluster_offset() 446 (n_end - n_start) < s->cluster_size) { in get_cluster_offset() 457 cluster_offset = QEMU_ALIGN_UP(cluster_offset, s->cluster_size); in get_cluster_offset() 460 ret = bdrv_co_pwrite(bs->file, cluster_offset, s->cluster_size, in get_cluster_offset() 472 cluster_offset = QEMU_ALIGN_UP(cluster_offset, s->cluster_size); in get_cluster_offset() 473 if (cluster_offset + s->cluster_size > INT64_MAX) { in get_cluster_offset() [all …]
|
H A D | qcow2.c | 147 clusterlen = size_to_clusters(s, headerlen) * s->cluster_size; in qcow2_crypto_hdr_init_func() 227 if (offset > s->cluster_size) in qcow2_read_extensions() 312 if ((s->crypto_header.offset % s->cluster_size) != 0) { in qcow2_read_extensions() 315 s->crypto_header.offset, s->cluster_size); in qcow2_read_extensions() 890 int min_refcount_cache = MIN_REFCOUNT_CACHE_SIZE * s->cluster_size; in read_cache_sizes() 892 uint64_t max_l2_entries = DIV_ROUND_UP(virtual_disk_size, s->cluster_size); in read_cache_sizes() 896 s->cluster_size); in read_cache_sizes() 910 opts, QCOW2_OPT_L2_CACHE_ENTRY_SIZE, s->cluster_size); in read_cache_sizes() 955 *l2_cache_entry_size = MIN(s->cluster_size, 4096); in read_cache_sizes() 962 *l2_cache_entry_size > s->cluster_size || in read_cache_sizes() [all …]
|
H A D | qed.h | 89 uint32_t cluster_size; /* in bytes */ member 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() 275 s->header.cluster_size; in qed_check_cluster_offset() 277 if (offset & (s->header.cluster_size - 1)) { in qed_check_cluster_offset() 289 s->header.cluster_size; in qed_check_table_offset()
|
H A D | qed.c | 60 cpu->cluster_size = le32_to_cpu(le->cluster_size); in qed_header_le_to_cpu() 75 le->cluster_size = cpu_to_le32(cpu->cluster_size); in qed_header_cpu_to_le() 139 static uint64_t qed_max_image_size(uint32_t cluster_size, uint32_t table_size) in qed_max_image_size() argument 144 table_entries = (table_size * cluster_size) / sizeof(uint64_t); in qed_max_image_size() 145 l2_size = table_entries * cluster_size; in qed_max_image_size() 150 static bool qed_is_cluster_size_valid(uint32_t cluster_size) in qed_is_cluster_size_valid() argument 152 if (cluster_size < QED_MIN_CLUSTER_SIZE || in qed_is_cluster_size_valid() 153 cluster_size > QED_MAX_CLUSTER_SIZE) { in qed_is_cluster_size_valid() 156 if (cluster_size & (cluster_size - 1)) { in qed_is_cluster_size_valid() 174 static bool qed_is_image_size_valid(uint64_t image_size, uint32_t cluster_size, in qed_is_image_size_valid() argument [all …]
|
H A D | parallels.c | 142 return off / s->cluster_size; in host_cluster_index() 219 s->used_bmap_size = DIV_ROUND_UP(payload_bytes, s->cluster_size); in parallels_fill_used_bitmap() 282 int64_t bytes = to_allocate * s->cluster_size; in allocate_clusters() 307 new_usedsize = s->used_bmap_size + bytes / s->cluster_size; in allocate_clusters() 322 host_off += first_free * s->cluster_size; in allocate_clusters() 332 s->cluster_size * to_allocate, 0); in allocate_clusters() 376 host_off += s->cluster_size; in allocate_clusters() 552 if (!QEMU_IS_ALIGNED(offset, s->cluster_size)) { in parallels_co_pdiscard() 554 } else if (!QEMU_IS_ALIGNED(bytes, s->cluster_size)) { in parallels_co_pdiscard() 558 cluster = offset / s->cluster_size; in parallels_co_pdiscard() [all …]
|
H A D | qcow2-refcount.c | 370 int64_t new_block = alloc_clusters_noref(bs, s->cluster_size, INT64_MAX); in alloc_refcount_block() 399 memset(*refcount_block, 0, s->cluster_size); in alloc_refcount_block() 408 ret = update_refcount(bs, new_block, s->cluster_size, 1, false, in alloc_refcount_block() 427 memset(*refcount_block, 0, s->cluster_size); in alloc_refcount_block() 492 s->cluster_size; in alloc_refcount_block() 545 assert(!(start_offset % s->cluster_size)); in qcow2_refcount_area() 547 qcow2_refcount_metadata_size(start_offset / s->cluster_size + in qcow2_refcount_area() 549 s->cluster_size, s->refcount_order, in qcow2_refcount_area() 560 area_reftable_index = (start_offset / s->cluster_size) / in qcow2_refcount_area() 570 table_size = ROUND_UP(table_size, s->cluster_size / REFTABLE_ENTRY_SIZE); in qcow2_refcount_area() [all …]
|
H A D | qcow2-bitmap.c | 129 static int check_table_entry(uint64_t entry, int cluster_size) in check_table_entry() argument 144 if (offset % cluster_size != 0) { in check_table_entry() 190 (bitmap_bytes > (uint64_t)BME_MAX_TABLE_SIZE * s->cluster_size)) in check_constraints_on_bitmap() 219 qcow2_free_clusters(bs, addr, s->cluster_size, QCOW2_DISCARD_ALWAYS); in clear_bitmap_table() 248 ret = check_table_entry(table[i], s->cluster_size); in bitmap_table_load() 305 buf = g_malloc(s->cluster_size); in load_bitmap_data() 306 limit = bdrv_dirty_bitmap_serialization_coverage(s->cluster_size, bitmap); in load_bitmap_data() 312 assert(check_table_entry(entry, s->cluster_size) == 0); in load_bitmap_data() 323 ret = bdrv_co_pread(bs->file, data_offset, s->cluster_size, buf, 0); in load_bitmap_data() 450 (entry->bitmap_table_offset % s->cluster_size) || in check_dir_entry() [all …]
|
H A D | parallels-ext.c | 74 s->cluster_size); in parallels_load_bitmap_data() 83 buf = qemu_blockalign(bs, s->cluster_size); in parallels_load_bitmap_data() 84 limit = bdrv_dirty_bitmap_serialization_coverage(s->cluster_size, bitmap); in parallels_load_bitmap_data() 98 s->cluster_size, buf, 0); in parallels_load_bitmap_data() 190 int remaining = s->cluster_size; in parallels_parse_format_extension() 286 uint8_t *ext_cluster = qemu_blockalign(bs, s->cluster_size); in parallels_read_format_extension() 290 ret = bdrv_pread(bs->file, ext_off, s->cluster_size, ext_cluster, 0); in parallels_read_format_extension()
|
/openbmc/linux/fs/f2fs/ |
H A D | compress.c | 63 return index & (cc->cluster_size - 1); in offset_in_cluster() 116 f2fs_drop_rpages(cc, cc->cluster_size, false); in f2fs_put_rpages() 129 for (i = 0; i < cc->cluster_size; i++) { in f2fs_put_rpages_wbc() 148 cc->rpages = page_array_alloc(cc->inode, cc->cluster_size); in f2fs_init_compress_ctx() 154 page_array_free(cc->inode, cc->rpages, cc->cluster_size); in f2fs_destroy_compress_ctx() 628 cc->cluster_size, fi->i_compress_algorithm); in f2fs_compress_pages() 649 cc->rbuf = f2fs_vmap(cc->rpages, cc->cluster_size); in f2fs_compress_pages() 665 max_len = PAGE_SIZE * (cc->cluster_size - 1) - COMPRESS_HEADER_SIZE; in f2fs_compress_pages() 690 vm_unmap_ram(cc->rbuf, cc->cluster_size); in f2fs_compress_pages() 709 vm_unmap_ram(cc->rbuf, cc->cluster_size); in f2fs_compress_pages() [all …]
|
/openbmc/qemu/tests/qemu-iotests/tests/ |
H A D | stream-unaligned-prefetch | 28 cluster_size = 64 * 1024 variable 45 '-o', 'cluster_size={}'.format(cluster_size // 2), 49 '-o', 'cluster_size={}'.format(cluster_size),
|