From: Max Reitz <mreitz@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: qemu-stable@nongnu.org, Peter Lieven <pl@kamp.de>,
Markus Armbruster <armbru@redhat.com>,
qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 03/12] block/nfs: Add create_opts
Date: Thu, 27 Nov 2014 14:24:38 +0100 [thread overview]
Message-ID: <54772616.4080204@redhat.com> (raw)
In-Reply-To: <5474970E.5030308@redhat.com>
On 2014-11-25 at 15:49, Max Reitz wrote:
> On 2014-11-25 at 15:41, Kevin Wolf wrote:
>> Am 25.11.2014 um 15:07 hat Max Reitz geschrieben:
>>> The nfs protocol driver is capable of creating images, but did not
>>> specify any creation options. Fix it.
>>>
>>> Cc: qemu-stable@nongnu.org
>>> Signed-off-by: Max Reitz <mreitz@redhat.com>
>> As you'll respin anyway: Can you mention how this would fail? (I suppose
>> some segfault when trying to access the options?)
>
> I'd have to try, but I guess it actually doesn't fail in most cases
> because the size option is part of the format drivers options anyway.
> I can imagine something being broken when doing preallocation in
> qcow2, though, which makes the qcow2 reset the size option.
Indeed it doesn't fail because the size option is part of the format
driver. The interesting thing is that all format block drivers take the
QemuOpts object which is basically the original options QDict absorbed
into their *and the protocol's* creation options QemuOptsList (with the
size option set etc. pp.), then take out the options they understand and
pass along the rest to the protocol driver.
This leads to the funny constellation that if a format driver does not
understand some option, it's passed on (you can use preallocation=full
with any format block driver, as long as the protocol is raw-posix), but
if it does, it's not (if you use qcow2, the protocol block driver will
only be given the preallocation option if qcow2 was so kind and set it
itself).
It seems too intentional to me to call it a bug...
However, as for this patch, I could indeed produce a failure case:
$ qemu-img create -f nfs nfs://127.0.0.1/foo.qcow2 64M
[1] 14582 segmentation fault (core dumped)
Maybe we want qemu-img to check whether the format given through -f or
-O is indeed a format... But for now, all the better for me as it gives
me something which I'm fixing. I won't make this an iotest, though,
because -f $protocol is not something that should actually work.
Max
next prev parent reply other threads:[~2014-11-27 13:25 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-25 14:07 [Qemu-devel] [PATCH 00/12] block: Various Coverity-spotted fixes Max Reitz
2014-11-25 14:07 ` [Qemu-devel] [PATCH 01/12] block: qcow2 driver may not be found Max Reitz
2014-11-26 7:23 ` Markus Armbruster
2014-11-26 9:13 ` Max Reitz
2014-11-26 15:19 ` Eric Blake
2014-11-26 15:20 ` Max Reitz
2014-11-26 15:24 ` Kevin Wolf
2014-11-27 9:02 ` Markus Armbruster
2014-11-25 14:07 ` [Qemu-devel] [PATCH 02/12] block/vvfat: qcow " Max Reitz
2014-11-25 14:07 ` [Qemu-devel] [PATCH 03/12] block/nfs: Add create_opts Max Reitz
2014-11-25 14:41 ` Kevin Wolf
2014-11-25 14:49 ` Max Reitz
2014-11-27 13:24 ` Max Reitz [this message]
2014-11-25 14:07 ` [Qemu-devel] [PATCH 04/12] block: Check create_opts before image creation Max Reitz
2014-11-25 14:07 ` [Qemu-devel] [PATCH 05/12] qemu-img: " Max Reitz
2014-11-25 14:07 ` [Qemu-devel] [PATCH 06/12] qemu-img: Check create_opts before image amendment Max Reitz
2014-11-25 14:08 ` [Qemu-devel] [PATCH 07/12] iotests: Only kill NBD server if it runs Max Reitz
2014-11-25 14:08 ` [Qemu-devel] [PATCH 08/12] iotests: Add test for unsupported image creation Max Reitz
2014-11-25 14:08 ` [Qemu-devel] [PATCH 09/12] qcow2: Prevent numerical overflow Max Reitz
2014-11-25 14:08 ` [Qemu-devel] [PATCH 10/12] qcow2: Flushing the caches in qcow2_close may fail Max Reitz
2014-11-25 14:22 ` Max Reitz
2014-11-25 14:49 ` Kevin Wolf
2014-11-25 14:08 ` [Qemu-devel] [PATCH 11/12] qcow2: Respect bdrv_truncate() error Max Reitz
2014-11-25 14:08 ` [Qemu-devel] [PATCH 12/12] block/raw-posix: Fix ret in raw_open_common() Max Reitz
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=54772616.4080204@redhat.com \
--to=mreitz@redhat.com \
--cc=armbru@redhat.com \
--cc=kwolf@redhat.com \
--cc=pl@kamp.de \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@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).