Skip to contentSkip to conversation

nbd BLOCK_STATUS with -m32

Qemu-devel Max Reitz 2 participants 2 messages Mar 26, 2018

lore
Share & tools
lore

Max Reitz

author
#0 lore raw

Hi,

iotests 209 and 123 fail under 32-bit (or at least with -m32), both with gcc and mingw.

Diff for 209:

@@ -1,2 +1,2 @@
-[{ "start": 0, "length": 524288, "depth": 0, "zero": false, "data": true}, -{ "start": 524288, "length": 524288, "depth": 0, "zero": true, "data":
false}]
+qemu-img: Protocol error: invalid payload for NBD_REPLY_TYPE_BLOCK_STATUS +qemu-img: Could not read file metadata: Invalid argument

Diff for 123:

@@ -3,6 +3,10 @@
Formatting 'TEST_DIR/source.IMGFMT', fmt=IMGFMT size=1048576 wrote 1048576/1048576 bytes at offset 0
1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+qemu-img: Protocol error: invalid payload for NBD_REPLY_TYPE_BLOCK_STATUS +qemu-img: error getting block status at offset 0: Invalid argument +qemu-img: error while writing sector 0: Input/output error +Pattern verification failed at offset 0, 1048576 bytes
read 1048576/1048576 bytes at offset 0
1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)

Max

#1 lore raw
Quoted 18 lines · Max Reitz

Hi,

iotests 209 and 123 fail under 32-bit (or at least with -m32), both with gcc and mingw.

Diff for 209:

(quoted diff) +0 -2
@@ -1,2 +1,2 @@
-[{ "start": 0, "length": 524288, "depth": 0, "zero": false, "data": true},
-{ "start": 524288, "length": 524288, "depth": 0, "zero": true, "data":

false}]

(quoted diff) +2 -0
+qemu-img: Protocol error: invalid payload for NBD_REPLY_TYPE_BLOCK_STATUS
+qemu-img: Could not read file metadata: Invalid argument

Diff for 123:

Review line 7

Quoted 5 lines
(quoted diff) +2 -0
@@ -3,6 +3,10 @@
  Formatting 'TEST_DIR/source.IMGFMT', fmt=IMGFMT size=1048576
  wrote 1048576/1048576 bytes at offset 0
  1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+qemu-img: Protocol error: invalid payload for NBD_REPLY_TYPE_BLOCK_STATUS
+qemu-img: error getting block status at offset 0: Invalid argument

Looks to be same root cause; probably an incorrect type promotion or truncation somewhere. I'll step through the code and submit a patch, hopefully in time for -rc1.

Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org