From: Fiona Ebner <f.ebner@proxmox.com>
To: Eric Blake <eblake@redhat.com>, qemu-devel@nongnu.org
Cc: Stefan Hajnoczi <stefanha@redhat.com>,
Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>,
"open list:Block layer core" <qemu-block@nongnu.org>
Subject: Re: [PULL 13/14] tests: Add iotest mirror-sparse for recent patches
Date: Wed, 21 May 2025 11:54:03 +0200 [thread overview]
Message-ID: <78bc08dc-5da5-4fcf-804b-1a387f2e9ea8@proxmox.com> (raw)
In-Reply-To: <20250515022904.575509-29-eblake@redhat.com>
Hi,
Am 15.05.25 um 04:28 schrieb Eric Blake:
> +do_test full ignore off full
for me, this one fails irregularly (more than 50% of the time) with:
-Destination is full; expected full
+Destination is unknown; expected full
My file system is ext4 inside a virtual machine.
> [I] febner@dev8 ~/repos/qemu/build/tests/qemu-iotests (master) [1]> findmnt --target .
> TARGET SOURCE FSTYPE OPTIONS
> /home/febner/repos /dev/sdb ext4 rw,relatime
The virtual disk is an LVM image. When the test fails, I consistently
get 20975616 bytes rather than 20971520 bytes as the result of
disk_usage(), i.e. it has one 4 KiB block more. ls -l will still report
20971520 bytes as the length, qemu-img compare succeeds.
After the image creation, i.e. job1, the allocation is still as expected:
> +20971520 /home/febner/repos/qemu/build/tests/qemu-iotests/scratch/raw-file-mirror-sparse/t.raw
> +-rw-r--r-- 1 febner febner 20971520 May 21 11:18 /home/febner/repos/qemu/build/tests/qemu-iotests/scratch/raw-file-mirror-sparse/t.raw
Only after mirroring, i.e. job2, it will be larger:
> +20975616 /home/febner/repos/qemu/build/tests/qemu-iotests/scratch/raw-file-mirror-sparse/t.raw
> +-rw-r--r-- 1 febner febner 20971520 May 21 11:18 /home/febner/repos/qemu/build/tests/qemu-iotests/scratch/raw-file-mirror-sparse/t.raw
Some more information:
> [I] febner@dev8 ~/repos/qemu/tests/qemu-iotests/tests (master)> sudo filefrag /home/febner/repos/qemu/build/tests/qemu-iotests/scratch/raw-file-mirror-sparse/t.raw -e
> Filesystem type is: ef53
> File size of /home/febner/repos/qemu/build/tests/qemu-iotests/scratch/raw-file-mirror-sparse/t.raw is 20971520 (5120 blocks of 4096 bytes)
> ext: logical_offset: physical_offset: length: expected: flags:
> 0: 0.. 15: 36233216.. 36233231: 16:
> 1: 16.. 2047: 36233232.. 36235263: 2032: unwritten
> 2: 2048.. 2559: 36239360.. 36239871: 512: 36235264:
> 3: 2560.. 4095: 36239872.. 36241407: 1536: unwritten
> 4: 4096.. 5119: 33792000.. 33793023: 1024: 36241408: last,unwritten,eof
> /home/febner/repos/qemu/build/tests/qemu-iotests/scratch/raw-file-mirror-sparse/t.raw: 3 extents found
Note that one of the offsets is not 4KiB-aligned:
> 36239360%4096
> 2048
I suppose that is the reason?
> [I] febner@dev8 ~/repos/qemu/tests/qemu-iotests/tests (master)> stat /home/febner/repos/qemu/build/tests/qemu-iotests/scratch/raw-file-mirror-sparse/t.raw
> File: /home/febner/repos/qemu/build/tests/qemu-iotests/scratch/raw-file-mirror-sparse/t.raw
> Size: 20971520 Blocks: 40968 IO Block: 4096 regular file
> Device: 8,16 Inode: 4866541 Links: 1
> Access: (0644/-rw-r--r--) Uid: ( 1000/ febner) Gid: ( 1000/ febner)
> Access: 2025-05-21 11:18:37.622692254 +0200
> Modify: 2025-05-21 11:18:37.540686997 +0200
> Change: 2025-05-21 11:18:37.540686997 +0200
> Birth: 2025-05-21 11:18:37.463682059 +0200
I also tried it on my host, where the filesystem is ZFS using
compression, and there, 'du' will already report a lower value after
creating the image, because of compression. And even without compression
it seems that preallocation=full on ZFS is somehow async :/
> [I] febner@enia ~/qemu/build/tests/qemu-iotests (master)> qemu-img create my.raw 20M -f raw -o preallocation=full
> Formatting 'my.raw', fmt=raw size=20971520 preallocation=full
> [I] febner@enia ~/qemu/build/tests/qemu-iotests (master)> du --block-size=1 my.raw
> 512 my.raw
> [I] febner@enia ~/qemu/build/tests/qemu-iotests (master)> du --block-size=1 my.raw
> 20980224 my.raw
Best Regards,
Fiona
next prev parent reply other threads:[~2025-05-21 9:54 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-15 2:28 [PULL 00/14] NBD patches for 2025-05-14 Eric Blake
2025-05-15 2:28 ` [PULL 01/14] block: Expand block status mode from bool to flags Eric Blake
2025-05-15 2:28 ` [PULL 02/14] file-posix, gluster: Handle zero block status hint better Eric Blake
2025-05-15 2:28 ` [PULL 03/14] block: Let bdrv_co_is_zero_fast consolidate adjacent extents Eric Blake
2025-05-15 2:28 ` [PULL 04/14] block: Add new bdrv_co_is_all_zeroes() function Eric Blake
2025-05-15 2:28 ` [PULL 05/14] iotests: Improve iotest 194 to mirror data Eric Blake
2025-05-15 2:28 ` [PULL 06/14] mirror: Minor refactoring Eric Blake
2025-05-15 2:28 ` [PULL 07/14] mirror: Pass full sync mode rather than bool to internals Eric Blake
2025-05-15 2:28 ` [PULL 08/14] mirror: Allow QMP override to declare target already zero Eric Blake
2025-05-15 2:28 ` [PULL 09/14] mirror: Drop redundant zero_target parameter Eric Blake
2025-05-15 2:28 ` [PULL 10/14] mirror: Skip pre-zeroing destination if it is already zero Eric Blake
2025-05-15 2:28 ` [PULL 11/14] mirror: Skip writing zeroes when target " Eric Blake
2025-05-15 2:28 ` [PULL 12/14] iotests/common.rc: add disk_usage function Eric Blake
2025-05-15 2:28 ` [PULL 13/14] tests: Add iotest mirror-sparse for recent patches Eric Blake
2025-05-21 9:54 ` Fiona Ebner [this message]
2025-05-21 15:32 ` Eric Blake
2025-05-22 7:30 ` Fiona Ebner
2025-05-28 11:39 ` Markus Armbruster
2025-05-28 12:40 ` Eric Blake
2025-05-28 13:27 ` Markus Armbruster
2025-05-28 15:40 ` Eric Blake
2025-05-28 16:23 ` Markus Armbruster
2025-05-28 18:22 ` Eric Blake
2025-05-15 2:28 ` [PULL 14/14] mirror: Reduce I/O when destination is detect-zeroes:unmap Eric Blake
2025-05-15 21:53 ` [PULL 00/14] NBD patches for 2025-05-14 Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=78bc08dc-5da5-4fcf-804b-1a387f2e9ea8@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=eblake@redhat.com \
--cc=hreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).