On Thu 09 Apr 2020 02:22:37 PM CEST, Max Reitz wrote: >> + ### Write subcluster #31-#34 (cluster overlap) ### > > #31-#34, I think.
That's what I wrote :-? >> + ### Partially zeroize an unallocated cluster (#3) >> + if [ "$use_backing_file" = "yes" ]; then >> + alloc="`seq 0 15`"; zero="" > > Isn’t this a TODO? (I.e., ideally we’d want the first 16 subclusters > to be zero, and the last 16 subclusters to be unallocated, right?) > > (I’m asking because you did raise a TODO for the “Zero subcluster #1” > test) Maybe, but I just implemented zeroize at the subcluster level :-) Wait for the next version of the series. >> + echo >> + echo "### Compressed cluster with subcluster bitmap != 0 - >> $corruption_test_cmd test ###" >> + echo >> + # We actually don't consider this a corrupted image. >> + # The bitmap in compressed clusters is unused so QEMU should just >> ignore it. >> + _make_test_img 1M >> + $QEMU_IO -c 'write -q -P 11 -c 0 64k' "$TEST_IMG" >> + poke_file "$TEST_IMG" $(($l2_offset+11)) "\x01\x01" >> + alloc="24"; zero="0" >> + _verify_l2_bitmap 0 "$alloc" "$zero" >> + $QEMU_IO -c "$corruption_test_cmd -P 11 0 64k" "$TEST_IMG" | >> _filter_qemu_io > > It might be interesting to see the bitmap after the write, i.e., that > it’s just been ignored. Yeah, why not. >> +echo "# 16K clusters, 64GB, extended_l2=off" # This needs one L1 table > > You mean one full L1 table cluster? > >> +$QEMU_IMG measure --size 64G -O qcow2 -o cluster_size=16k,extended_l2=off >> +echo "# 16K clusters, 64GB, extended_l2=on" # This needs two L2 tables > > And two full L1 table clusters? You're right, I'll correct that. Berto