Comment 1 for bug 1422307

Revision history for this message
Max Reitz (xanclic) wrote :

Hi Pierre,

I can reproduce the bug with a 2 GB VDI image with a single FAT32-formatted partition (on git master):

# cp src.vdi test.vdi
# ./qemu-nbd -c /dev/nbd0 test.vdi
# dd if=/dev/urandom of=/dev/nbd0 bs=1M count=64
64+0 records in
64+0 records out
67108864 bytes (67 MB) copied, 3.34091 s, 20.1 MB/s
# md5sum /dev/nbd0
bfa6726d0d8fe752c0c7dccbf770fae6 /dev/nbd0
# sync
# echo 1 > /proc/sys/vm/drop_caches
# md5sum /dev/nbd0
cb4762769e09ed6da5e327710bfb3996 /dev/nbd0
# ./qemu-nbd -d /dev/nbd0
/dev/nbd0 disconnected

Using qcow2 or not using NBD I cannot reproduce the issue. Using a qcow2 image and converting it to VDI, the issue appears again.

Using an empty VDI image, or one filled with random data, the issue does not appear either.

I have attached a qcow2 image for others to test:

# ./qemu-img convert -O vdi src.qcow2 test.vdi; ./qemu-nbd -c /dev/nbd0 test.vdi; dd if=/dev/urandom of=/dev/nbd0 bs=1M count=64; md5sum /dev/nbd0; sync; echo 1 > /proc/sys/vm/drop_caches; md5sum /dev/nbd0; ./qemu-nbd -d /dev/nbd0
64+0 records in
64+0 records out
67108864 bytes (67 MB) copied, 3.33071 s, 20.1 MB/s
9f683b4a58cecdd8da04ec2f1b7abc4a /dev/nbd0
efb1cdd5ebe1dd326056eb2f2e500944 /dev/nbd0
/dev/nbd0 disconnected

Unfortunately, I do not yet know the cause of this issue.

Max