On 4/10/19 2:28 PM, Max Reitz wrote: > On 01.04.19 16:57, Eric Blake wrote: >> Disk sizes close to INT64_MAX cause overflow, for some pretty >> ridiculous output: >> >> $ ./nbdkit -U - memory size=$((2**63 - 512)) --run 'qemu-img info $nbd' >> image: nbd+unix://?socket=/tmp/nbdkitHSAzNz/socket >> file format: raw >> virtual size: -8388607T (9223372036854775296 bytes) >> disk size: unavailable >>
> > There are more iotests this breaks. First, there is 059 for vmdk, which > looks just like the rest. Easy enough; I was able to reproduce. > > But for -m32, it gets a bit more difficult. Every size above 999 GB > (1000 GB gets rounded to 1 TB, which is 2^31 * 512) gets printed as > "inf [unit]": Ouch - pre-existing bug in size_to_str(); I'll have to fix that, then send a v3. Kevin, do you want to unqueue this from block-next until then? > > But regardless of the iotests, we shouldn’t show the size as infinite > just because of -m32. Is there an easy docker setup for building -m32? -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature